<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML>
<HEAD>
<LINK REL=STYLESHEET TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
<META NAME="GENERATOR" CONTENT="Java2HTML Version 1.5">
<TITLE>jminusminus.CLAbsorber (Java2HTML)</TITLE>
</HEAD>
<BODY><TABLE id="Header" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td colspan="2" width="33%">&nbsp;</td>
<td align="center" colspan="2" width="33%">
<font size="4">CLAbsorber.java</font>
</td>
<td align="right" colspan="2" width="33%">&nbsp;</td>
</tr>
</TABLE>
<pre ID="Classes">
<FONT ID="LN">1   </FONT><A NAME="1"></A><FONT ID="SingleLineComment">// Copyright 2013 Bill Campbell, Swami Iyer and Bahar Akbal-Delibas
<FONT ID="LN">2   </FONT><A NAME="2"></A></FONT>
<FONT ID="LN">3   </FONT><A NAME="3"></A><FONT ID="Package">package</FONT> jminusminus;
<FONT ID="LN">4   </FONT><A NAME="4"></A>
<FONT ID="LN">5   </FONT><A NAME="5"></A><FONT ID="Import">import</FONT> java.io.EOFException;
<FONT ID="LN">6   </FONT><A NAME="6"></A><FONT ID="Import">import</FONT> java.io.IOException;
<FONT ID="LN">7   </FONT><A NAME="7"></A><FONT ID="Import">import</FONT> java.io.DataInputStream;
<FONT ID="LN">8   </FONT><A NAME="8"></A><FONT ID="Import">import</FONT> java.io.InputStream;
<FONT ID="LN">9   </FONT><A NAME="9"></A><FONT ID="Import">import</FONT> java.util.ArrayList;
<FONT ID="LN">10  </FONT><A NAME="10"></A><FONT ID="Import">import</FONT> <FONT ID="Static">static</FONT> <A HREF="../jminusminus/CLConstants.java.html">jminusminus.CLConstants</A>.*;
<FONT ID="LN">11  </FONT><A NAME="11"></A>
<FONT ID="LN">12  </FONT><A NAME="12"></A><FONT ID="FormalComment">/**
<FONT ID="LN">13  </FONT><A NAME="13"></A> * CLAbsorber is for reading a Java class into an in-memory CLFile
<FONT ID="LN">14  </FONT><A NAME="14"></A> * representation and printing it out to STDOUT in a format similar to that of
<FONT ID="LN">15  </FONT><A NAME="15"></A> * javap.
<FONT ID="LN">16  </FONT><A NAME="16"></A> */</FONT>
<FONT ID="LN">17  </FONT><A NAME="17"></A>
<FONT ID="LN">18  </FONT><A NAME="18"></A><FONT ID="Public">public</FONT> <FONT ID="Class">class</FONT> CLAbsorber {
<FONT ID="LN">19  </FONT><A NAME="19"></A>
<FONT ID="LN">20  </FONT><A NAME="20"></A>    <FONT ID="FormalComment">/** CLFile representation of the class that is read. */</FONT>
<FONT ID="LN">21  </FONT><A NAME="21"></A>    <FONT ID="Private">private</FONT> <A HREF="../jminusminus/CLFile.java.html">CLFile</A> classFile;
<FONT ID="LN">22  </FONT><A NAME="22"></A>
<FONT ID="LN">23  </FONT><A NAME="23"></A>    <FONT ID="FormalComment">/** Whether or not an error occurred in reading the class. */</FONT>
<FONT ID="LN">24  </FONT><A NAME="24"></A>    <FONT ID="Private">private</FONT> <FONT ID="Boolean">boolean</FONT> errorHasOccurred;
<FONT ID="LN">25  </FONT><A NAME="25"></A>
<FONT ID="LN">26  </FONT><A NAME="26"></A>    <FONT ID="FormalComment">/** Name of the class that is read. */</FONT>
<FONT ID="LN">27  </FONT><A NAME="27"></A>    <FONT ID="Private">private</FONT> String className;
<FONT ID="LN">28  </FONT><A NAME="28"></A>
<FONT ID="LN">29  </FONT><A NAME="29"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">30  </FONT><A NAME="30"></A>     * Print the specified warning to STDERR.
<FONT ID="LN">31  </FONT><A NAME="31"></A>     * 
<FONT ID="LN">32  </FONT><A NAME="32"></A>     * @param message
<FONT ID="LN">33  </FONT><A NAME="33"></A>     *            warning.
<FONT ID="LN">34  </FONT><A NAME="34"></A>     * @param args
<FONT ID="LN">35  </FONT><A NAME="35"></A>     *            related values.
<FONT ID="LN">36  </FONT><A NAME="36"></A>     */</FONT>
<FONT ID="LN">37  </FONT><A NAME="37"></A>
<FONT ID="LN">38  </FONT><A NAME="38"></A>    <FONT ID="Private">private</FONT> <FONT ID="Void">void</FONT> reportWarning(String message, Object... args) {
<FONT ID="LN">39  </FONT><A NAME="39"></A>        System.err.printf(<FONT ID="StringLiteral">"CLAbsorber Warning: "</FONT> + message + <FONT ID="StringLiteral">"\n"</FONT>, args);
<FONT ID="LN">40  </FONT><A NAME="40"></A>    }
<FONT ID="LN">41  </FONT><A NAME="41"></A>
<FONT ID="LN">42  </FONT><A NAME="42"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">43  </FONT><A NAME="43"></A>     * Print the specified error message to STDERR and set the error flag to
<FONT ID="LN">44  </FONT><A NAME="44"></A>     * true.
<FONT ID="LN">45  </FONT><A NAME="45"></A>     * 
<FONT ID="LN">46  </FONT><A NAME="46"></A>     * @param message
<FONT ID="LN">47  </FONT><A NAME="47"></A>     *            error message.
<FONT ID="LN">48  </FONT><A NAME="48"></A>     * @param args
<FONT ID="LN">49  </FONT><A NAME="49"></A>     *            related values.
<FONT ID="LN">50  </FONT><A NAME="50"></A>     */</FONT>
<FONT ID="LN">51  </FONT><A NAME="51"></A>
<FONT ID="LN">52  </FONT><A NAME="52"></A>    <FONT ID="Private">private</FONT> <FONT ID="Void">void</FONT> reportError(String message, Object... args) {
<FONT ID="LN">53  </FONT><A NAME="53"></A>        System.err.printf(<FONT ID="StringLiteral">"CLAbsorber Error: "</FONT> + message + <FONT ID="StringLiteral">"\n"</FONT>, args);
<FONT ID="LN">54  </FONT><A NAME="54"></A>        errorHasOccurred = <FONT ID="True">true</FONT>;
<FONT ID="LN">55  </FONT><A NAME="55"></A>    }
<FONT ID="LN">56  </FONT><A NAME="56"></A>
<FONT ID="LN">57  </FONT><A NAME="57"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">58  </FONT><A NAME="58"></A>     * Read the constant pool information from the specified stream, and return
<FONT ID="LN">59  </FONT><A NAME="59"></A>     * the information as a CLConstantPool object.
<FONT ID="LN">60  </FONT><A NAME="60"></A>     * 
<FONT ID="LN">61  </FONT><A NAME="61"></A>     * @param in
<FONT ID="LN">62  </FONT><A NAME="62"></A>     *            input stream.
<FONT ID="LN">63  </FONT><A NAME="63"></A>     * @return the constant pool.
<FONT ID="LN">64  </FONT><A NAME="64"></A>     */</FONT>
<FONT ID="LN">65  </FONT><A NAME="65"></A>
<FONT ID="LN">66  </FONT><A NAME="66"></A>    <FONT ID="Private">private</FONT> <A HREF="../jminusminus/CLConstantPool.java.html">CLConstantPool</A> readConstantPool(CLInputStream in) {
<FONT ID="LN">67  </FONT><A NAME="67"></A>        <A HREF="../jminusminus/CLConstantPool.java.html">CLConstantPool</A> cp = <FONT ID="New">new</FONT> <A HREF="../jminusminus/CLConstantPool.java.html">CLConstantPool</A>();
<FONT ID="LN">68  </FONT><A NAME="68"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">69  </FONT><A NAME="69"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> i = <FONT ID="IntegerLiteral">1</FONT>; i &lt; classFile.constantPoolCount; i++) {
<FONT ID="LN">70  </FONT><A NAME="70"></A>                <FONT ID="Int">int</FONT> tag = in.readUnsignedByte();
<FONT ID="LN">71  </FONT><A NAME="71"></A>                <FONT ID="Switch">switch</FONT> (tag) {
<FONT ID="LN">72  </FONT><A NAME="72"></A>                <FONT ID="Case">case</FONT> CONSTANT_Class:
<FONT ID="LN">73  </FONT><A NAME="73"></A>                    cp
<FONT ID="LN">74  </FONT><A NAME="74"></A>                            .addCPItem(<FONT ID="New">new</FONT> CLConstantClassInfo(in
<FONT ID="LN">75  </FONT><A NAME="75"></A>                                    .readUnsignedShort()));
<FONT ID="LN">76  </FONT><A NAME="76"></A>                    <FONT ID="Break">break</FONT>;
<FONT ID="LN">77  </FONT><A NAME="77"></A>                <FONT ID="Case">case</FONT> CONSTANT_Fieldref:
<FONT ID="LN">78  </FONT><A NAME="78"></A>                    cp.addCPItem(<FONT ID="New">new</FONT> CLConstantFieldRefInfo(in
<FONT ID="LN">79  </FONT><A NAME="79"></A>                            .readUnsignedShort(), in.readUnsignedShort()));
<FONT ID="LN">80  </FONT><A NAME="80"></A>                    <FONT ID="Break">break</FONT>;
<FONT ID="LN">81  </FONT><A NAME="81"></A>                <FONT ID="Case">case</FONT> CONSTANT_Methodref:
<FONT ID="LN">82  </FONT><A NAME="82"></A>                    cp.addCPItem(<FONT ID="New">new</FONT> CLConstantMethodRefInfo(in
<FONT ID="LN">83  </FONT><A NAME="83"></A>                            .readUnsignedShort(), in.readUnsignedShort()));
<FONT ID="LN">84  </FONT><A NAME="84"></A>                    <FONT ID="Break">break</FONT>;
<FONT ID="LN">85  </FONT><A NAME="85"></A>                <FONT ID="Case">case</FONT> CONSTANT_InterfaceMethodref:
<FONT ID="LN">86  </FONT><A NAME="86"></A>                    cp.addCPItem(<FONT ID="New">new</FONT> CLConstantInterfaceMethodRefInfo(in
<FONT ID="LN">87  </FONT><A NAME="87"></A>                            .readUnsignedShort(), in.readUnsignedShort()));
<FONT ID="LN">88  </FONT><A NAME="88"></A>                    <FONT ID="Break">break</FONT>;
<FONT ID="LN">89  </FONT><A NAME="89"></A>                <FONT ID="Case">case</FONT> CONSTANT_String:
<FONT ID="LN">90  </FONT><A NAME="90"></A>                    cp.addCPItem(<FONT ID="New">new</FONT> CLConstantStringInfo(in
<FONT ID="LN">91  </FONT><A NAME="91"></A>                            .readUnsignedShort()));
<FONT ID="LN">92  </FONT><A NAME="92"></A>                    <FONT ID="Break">break</FONT>;
<FONT ID="LN">93  </FONT><A NAME="93"></A>                <FONT ID="Case">case</FONT> CONSTANT_Integer:
<FONT ID="LN">94  </FONT><A NAME="94"></A>                    cp.addCPItem(<FONT ID="New">new</FONT> CLConstantIntegerInfo(in.readInt()));
<FONT ID="LN">95  </FONT><A NAME="95"></A>                    <FONT ID="Break">break</FONT>;
<FONT ID="LN">96  </FONT><A NAME="96"></A>                <FONT ID="Case">case</FONT> CONSTANT_Float:
<FONT ID="LN">97  </FONT><A NAME="97"></A>                    cp.addCPItem(<FONT ID="New">new</FONT> CLConstantFloatInfo(in.readFloat()));
<FONT ID="LN">98  </FONT><A NAME="98"></A>                    <FONT ID="Break">break</FONT>;
<FONT ID="LN">99  </FONT><A NAME="99"></A>                <FONT ID="Case">case</FONT> CONSTANT_Long:
<FONT ID="LN">100 </FONT><A NAME="100"></A>                    cp.addCPItem(<FONT ID="New">new</FONT> CLConstantLongInfo(in.readLong()));
<FONT ID="LN">101 </FONT><A NAME="101"></A>                    i++;
<FONT ID="LN">102 </FONT><A NAME="102"></A>                    <FONT ID="Break">break</FONT>;
<FONT ID="LN">103 </FONT><A NAME="103"></A>                <FONT ID="Case">case</FONT> CONSTANT_Double:
<FONT ID="LN">104 </FONT><A NAME="104"></A>                    cp.addCPItem(<FONT ID="New">new</FONT> CLConstantDoubleInfo(in.readDouble()));
<FONT ID="LN">105 </FONT><A NAME="105"></A>                    i++;
<FONT ID="LN">106 </FONT><A NAME="106"></A>                    <FONT ID="Break">break</FONT>;
<FONT ID="LN">107 </FONT><A NAME="107"></A>                <FONT ID="Case">case</FONT> CONSTANT_NameAndType:
<FONT ID="LN">108 </FONT><A NAME="108"></A>                    cp.addCPItem(<FONT ID="New">new</FONT> CLConstantNameAndTypeInfo(in
<FONT ID="LN">109 </FONT><A NAME="109"></A>                            .readUnsignedShort(), in.readUnsignedShort()));
<FONT ID="LN">110 </FONT><A NAME="110"></A>                    <FONT ID="Break">break</FONT>;
<FONT ID="LN">111 </FONT><A NAME="111"></A>                <FONT ID="Case">case</FONT> CONSTANT_Utf8:
<FONT ID="LN">112 </FONT><A NAME="112"></A>                    <FONT ID="Int">int</FONT> length = in.readUnsignedShort();
<FONT ID="LN">113 </FONT><A NAME="113"></A>                    <FONT ID="Byte">byte</FONT>[] b = <FONT ID="New">new</FONT> <FONT ID="Byte">byte</FONT>[length];
<FONT ID="LN">114 </FONT><A NAME="114"></A>                    in.read(b);
<FONT ID="LN">115 </FONT><A NAME="115"></A>                    cp.addCPItem(<FONT ID="New">new</FONT> CLConstantUtf8Info(b));
<FONT ID="LN">116 </FONT><A NAME="116"></A>                    <FONT ID="Break">break</FONT>;
<FONT ID="LN">117 </FONT><A NAME="117"></A>                <FONT ID="Default">default</FONT>:
<FONT ID="LN">118 </FONT><A NAME="118"></A>                    reportError(<FONT ID="StringLiteral">"Unknown cp_info tag '%d'"</FONT>, tag);
<FONT ID="LN">119 </FONT><A NAME="119"></A>                    <FONT ID="Return">return</FONT> cp;
<FONT ID="LN">120 </FONT><A NAME="120"></A>                }
<FONT ID="LN">121 </FONT><A NAME="121"></A>            }
<FONT ID="LN">122 </FONT><A NAME="122"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">123 </FONT><A NAME="123"></A>            reportError(<FONT ID="StringLiteral">"Error reading constant pool from file %s"</FONT>, className);
<FONT ID="LN">124 </FONT><A NAME="124"></A>        }
<FONT ID="LN">125 </FONT><A NAME="125"></A>        <FONT ID="Return">return</FONT> cp;
<FONT ID="LN">126 </FONT><A NAME="126"></A>    }
<FONT ID="LN">127 </FONT><A NAME="127"></A>
<FONT ID="LN">128 </FONT><A NAME="128"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">129 </FONT><A NAME="129"></A>     * Read the fields from the specified stream, and return them as a list.
<FONT ID="LN">130 </FONT><A NAME="130"></A>     * 
<FONT ID="LN">131 </FONT><A NAME="131"></A>     * @param in
<FONT ID="LN">132 </FONT><A NAME="132"></A>     *            input stream.
<FONT ID="LN">133 </FONT><A NAME="133"></A>     * @param fieldsCount
<FONT ID="LN">134 </FONT><A NAME="134"></A>     *            number of fields.
<FONT ID="LN">135 </FONT><A NAME="135"></A>     * @return list of fields.
<FONT ID="LN">136 </FONT><A NAME="136"></A>     */</FONT>
<FONT ID="LN">137 </FONT><A NAME="137"></A>
<FONT ID="LN">138 </FONT><A NAME="138"></A>    <FONT ID="Private">private</FONT> ArrayList&lt;CLFieldInfo&gt; readFields(CLInputStream in, <FONT ID="Int">int</FONT> fieldsCount) {
<FONT ID="LN">139 </FONT><A NAME="139"></A>        ArrayList&lt;CLFieldInfo&gt; fields = <FONT ID="New">new</FONT> ArrayList&lt;CLFieldInfo&gt;();
<FONT ID="LN">140 </FONT><A NAME="140"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">141 </FONT><A NAME="141"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> i = <FONT ID="IntegerLiteral">0</FONT>; i &lt; fieldsCount; i++) {
<FONT ID="LN">142 </FONT><A NAME="142"></A>                <FONT ID="Int">int</FONT> accessFlags = in.readUnsignedShort();
<FONT ID="LN">143 </FONT><A NAME="143"></A>                <FONT ID="Int">int</FONT> nameIndex = in.readUnsignedShort();
<FONT ID="LN">144 </FONT><A NAME="144"></A>                <FONT ID="Int">int</FONT> descriptorIndex = in.readUnsignedShort();
<FONT ID="LN">145 </FONT><A NAME="145"></A>                <FONT ID="Int">int</FONT> attributesCount = in.readUnsignedShort();
<FONT ID="LN">146 </FONT><A NAME="146"></A>                fields.add(<FONT ID="New">new</FONT> CLFieldInfo(accessFlags, nameIndex,
<FONT ID="LN">147 </FONT><A NAME="147"></A>                        descriptorIndex, attributesCount, readAttributes(in,
<FONT ID="LN">148 </FONT><A NAME="148"></A>                                attributesCount)));
<FONT ID="LN">149 </FONT><A NAME="149"></A>            }
<FONT ID="LN">150 </FONT><A NAME="150"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">151 </FONT><A NAME="151"></A>            reportError(<FONT ID="StringLiteral">"Error reading fields from file %s"</FONT>, className);
<FONT ID="LN">152 </FONT><A NAME="152"></A>        }
<FONT ID="LN">153 </FONT><A NAME="153"></A>        <FONT ID="Return">return</FONT> fields;
<FONT ID="LN">154 </FONT><A NAME="154"></A>    }
<FONT ID="LN">155 </FONT><A NAME="155"></A>
<FONT ID="LN">156 </FONT><A NAME="156"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">157 </FONT><A NAME="157"></A>     * Read the methods from the specified stream, and return them as a list.
<FONT ID="LN">158 </FONT><A NAME="158"></A>     * 
<FONT ID="LN">159 </FONT><A NAME="159"></A>     * @param in
<FONT ID="LN">160 </FONT><A NAME="160"></A>     *            input stream.
<FONT ID="LN">161 </FONT><A NAME="161"></A>     * @param methodsCount
<FONT ID="LN">162 </FONT><A NAME="162"></A>     *            number of methods.
<FONT ID="LN">163 </FONT><A NAME="163"></A>     * @return the methods.
<FONT ID="LN">164 </FONT><A NAME="164"></A>     */</FONT>
<FONT ID="LN">165 </FONT><A NAME="165"></A>
<FONT ID="LN">166 </FONT><A NAME="166"></A>    <FONT ID="Private">private</FONT> ArrayList&lt;CLMethodInfo&gt; readMethods(CLInputStream in,
<FONT ID="LN">167 </FONT><A NAME="167"></A>            <FONT ID="Int">int</FONT> methodsCount) {
<FONT ID="LN">168 </FONT><A NAME="168"></A>        ArrayList&lt;CLMethodInfo&gt; methods = <FONT ID="New">new</FONT> ArrayList&lt;CLMethodInfo&gt;();
<FONT ID="LN">169 </FONT><A NAME="169"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">170 </FONT><A NAME="170"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> i = <FONT ID="IntegerLiteral">0</FONT>; i &lt; methodsCount; i++) {
<FONT ID="LN">171 </FONT><A NAME="171"></A>                <FONT ID="Int">int</FONT> accessFlags = in.readUnsignedShort();
<FONT ID="LN">172 </FONT><A NAME="172"></A>                <FONT ID="Int">int</FONT> nameIndex = in.readUnsignedShort();
<FONT ID="LN">173 </FONT><A NAME="173"></A>                <FONT ID="Int">int</FONT> descriptorIndex = in.readUnsignedShort();
<FONT ID="LN">174 </FONT><A NAME="174"></A>                <FONT ID="Int">int</FONT> attributesCount = in.readUnsignedShort();
<FONT ID="LN">175 </FONT><A NAME="175"></A>                methods.add(<FONT ID="New">new</FONT> CLMethodInfo(accessFlags, nameIndex,
<FONT ID="LN">176 </FONT><A NAME="176"></A>                        descriptorIndex, attributesCount, readAttributes(in,
<FONT ID="LN">177 </FONT><A NAME="177"></A>                                attributesCount)));
<FONT ID="LN">178 </FONT><A NAME="178"></A>            }
<FONT ID="LN">179 </FONT><A NAME="179"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">180 </FONT><A NAME="180"></A>            reportError(<FONT ID="StringLiteral">"Error reading methods from file %s"</FONT>, className);
<FONT ID="LN">181 </FONT><A NAME="181"></A>        }
<FONT ID="LN">182 </FONT><A NAME="182"></A>        <FONT ID="Return">return</FONT> methods;
<FONT ID="LN">183 </FONT><A NAME="183"></A>    }
<FONT ID="LN">184 </FONT><A NAME="184"></A>
<FONT ID="LN">185 </FONT><A NAME="185"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">186 </FONT><A NAME="186"></A>     * Read the attributes from the specified stream, and return them as a list
<FONT ID="LN">187 </FONT><A NAME="187"></A>     * 
<FONT ID="LN">188 </FONT><A NAME="188"></A>     * @param in
<FONT ID="LN">189 </FONT><A NAME="189"></A>     *            input stream.
<FONT ID="LN">190 </FONT><A NAME="190"></A>     * @param attributeCount
<FONT ID="LN">191 </FONT><A NAME="191"></A>     *            number of attributes.
<FONT ID="LN">192 </FONT><A NAME="192"></A>     * @return list of attributes.
<FONT ID="LN">193 </FONT><A NAME="193"></A>     */</FONT>
<FONT ID="LN">194 </FONT><A NAME="194"></A>
<FONT ID="LN">195 </FONT><A NAME="195"></A>    <FONT ID="Private">private</FONT> ArrayList&lt;<A HREF="../jminusminus/CLAttributeInfo.java.html">CLAttributeInfo</A>&gt; readAttributes(CLInputStream in,
<FONT ID="LN">196 </FONT><A NAME="196"></A>            <FONT ID="Int">int</FONT> attributesCount) {
<FONT ID="LN">197 </FONT><A NAME="197"></A>        ArrayList&lt;<A HREF="../jminusminus/CLAttributeInfo.java.html">CLAttributeInfo</A>&gt; attributes = <FONT ID="New">new</FONT> ArrayList&lt;<A HREF="../jminusminus/CLAttributeInfo.java.html">CLAttributeInfo</A>&gt;();
<FONT ID="LN">198 </FONT><A NAME="198"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">199 </FONT><A NAME="199"></A>            <A HREF="../jminusminus/CLConstantPool.java.html">CLConstantPool</A> cp = classFile.constantPool;
<FONT ID="LN">200 </FONT><A NAME="200"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> i = <FONT ID="IntegerLiteral">0</FONT>; i &lt; attributesCount; i++) {
<FONT ID="LN">201 </FONT><A NAME="201"></A>                <FONT ID="Int">int</FONT> attributeNameIndex = in.readUnsignedShort();
<FONT ID="LN">202 </FONT><A NAME="202"></A>                <FONT ID="Long">long</FONT> attributeLength = in.readUnsignedInt();
<FONT ID="LN">203 </FONT><A NAME="203"></A>                <A HREF="../jminusminus/CLAttributeInfo.java.html">CLAttributeInfo</A> attributeInfo = <FONT ID="Null">null</FONT>;
<FONT ID="LN">204 </FONT><A NAME="204"></A>                String attributeName = <FONT ID="New">new</FONT> String(((CLConstantUtf8Info) cp
<FONT ID="LN">205 </FONT><A NAME="205"></A>                        .cpItem(attributeNameIndex)).b);
<FONT ID="LN">206 </FONT><A NAME="206"></A>                <FONT ID="If">if</FONT> (attributeName.equals(ATT_CONSTANT_VALUE)) {
<FONT ID="LN">207 </FONT><A NAME="207"></A>                    attributeInfo = readConstantValueAttribute(in,
<FONT ID="LN">208 </FONT><A NAME="208"></A>                            attributeNameIndex, attributeLength);
<FONT ID="LN">209 </FONT><A NAME="209"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName.equals(ATT_CODE)) {
<FONT ID="LN">210 </FONT><A NAME="210"></A>                    attributeInfo = readCodeAttribute(in, attributeNameIndex,
<FONT ID="LN">211 </FONT><A NAME="211"></A>                            attributeLength);
<FONT ID="LN">212 </FONT><A NAME="212"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName.equals(ATT_EXCEPTIONS)) {
<FONT ID="LN">213 </FONT><A NAME="213"></A>                    attributeInfo = readExceptionsAttribute(in,
<FONT ID="LN">214 </FONT><A NAME="214"></A>                            attributeNameIndex, attributeLength);
<FONT ID="LN">215 </FONT><A NAME="215"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName.equals(ATT_INNER_CLASSES)) {
<FONT ID="LN">216 </FONT><A NAME="216"></A>                    attributeInfo = readInnerClassesAttribute(in,
<FONT ID="LN">217 </FONT><A NAME="217"></A>                            attributeNameIndex, attributeLength);
<FONT ID="LN">218 </FONT><A NAME="218"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName.equals(ATT_ENCLOSING_METHOD)) {
<FONT ID="LN">219 </FONT><A NAME="219"></A>                    attributeInfo = readEnclosingMethodAttribute(in,
<FONT ID="LN">220 </FONT><A NAME="220"></A>                            attributeNameIndex, attributeLength);
<FONT ID="LN">221 </FONT><A NAME="221"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName.equals(ATT_SYNTHETIC)) {
<FONT ID="LN">222 </FONT><A NAME="222"></A>                    attributeInfo = readSyntheticAttribute(in,
<FONT ID="LN">223 </FONT><A NAME="223"></A>                            attributeNameIndex, attributeLength);
<FONT ID="LN">224 </FONT><A NAME="224"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName.equals(ATT_SIGNATURE)) {
<FONT ID="LN">225 </FONT><A NAME="225"></A>                    attributeInfo = readSignatureAttribute(in,
<FONT ID="LN">226 </FONT><A NAME="226"></A>                            attributeNameIndex, attributeLength);
<FONT ID="LN">227 </FONT><A NAME="227"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName.equals(ATT_SOURCE_FILE)) {
<FONT ID="LN">228 </FONT><A NAME="228"></A>                    attributeInfo = readSourceFileAttribute(in,
<FONT ID="LN">229 </FONT><A NAME="229"></A>                            attributeNameIndex, attributeLength);
<FONT ID="LN">230 </FONT><A NAME="230"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName.equals(ATT_SOURCE_DEBUG_EXTENSION)) {
<FONT ID="LN">231 </FONT><A NAME="231"></A>                    attributeInfo = readSourceDebugExtensionAttribute(in,
<FONT ID="LN">232 </FONT><A NAME="232"></A>                            attributeNameIndex, attributeLength);
<FONT ID="LN">233 </FONT><A NAME="233"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName.equals(ATT_LINE_NUMBER_TABLE)) {
<FONT ID="LN">234 </FONT><A NAME="234"></A>                    attributeInfo = readLineNumberTableAttribute(in,
<FONT ID="LN">235 </FONT><A NAME="235"></A>                            attributeNameIndex, attributeLength);
<FONT ID="LN">236 </FONT><A NAME="236"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName.equals(ATT_LOCAL_VARIABLE_TABLE)) {
<FONT ID="LN">237 </FONT><A NAME="237"></A>                    attributeInfo = readLocalVariableTableAttribute(in,
<FONT ID="LN">238 </FONT><A NAME="238"></A>                            attributeNameIndex, attributeLength);
<FONT ID="LN">239 </FONT><A NAME="239"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName.equals(ATT_LOCAL_VARIABLE_TYPE_TABLE)) {
<FONT ID="LN">240 </FONT><A NAME="240"></A>                    attributeInfo = readLocalVariableTypeTableAttribute(in,
<FONT ID="LN">241 </FONT><A NAME="241"></A>                            attributeNameIndex, attributeLength);
<FONT ID="LN">242 </FONT><A NAME="242"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName.equals(ATT_DEPRECATED)) {
<FONT ID="LN">243 </FONT><A NAME="243"></A>                    attributeInfo = readDeprecatedAttribute(in,
<FONT ID="LN">244 </FONT><A NAME="244"></A>                            attributeNameIndex, attributeLength);
<FONT ID="LN">245 </FONT><A NAME="245"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName
<FONT ID="LN">246 </FONT><A NAME="246"></A>                        .equals(ATT_RUNTIME_VISIBLE_ANNOTATIONS)) {
<FONT ID="LN">247 </FONT><A NAME="247"></A>                    attributeInfo = readRuntimeVisibleAnnotationsAttribute(in,
<FONT ID="LN">248 </FONT><A NAME="248"></A>                            attributeNameIndex, attributeLength);
<FONT ID="LN">249 </FONT><A NAME="249"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName
<FONT ID="LN">250 </FONT><A NAME="250"></A>                        .equals(ATT_RUNTIME_INVISIBLE_ANNOTATIONS)) {
<FONT ID="LN">251 </FONT><A NAME="251"></A>                    attributeInfo = readRuntimeInvisibleAnnotationsAttribute(
<FONT ID="LN">252 </FONT><A NAME="252"></A>                            in, attributeNameIndex, attributeLength);
<FONT ID="LN">253 </FONT><A NAME="253"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName
<FONT ID="LN">254 </FONT><A NAME="254"></A>                        .equals(ATT_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS)) {
<FONT ID="LN">255 </FONT><A NAME="255"></A>                    attributeInfo = readRuntimeVisibleParameterAnnotationsAttribute(
<FONT ID="LN">256 </FONT><A NAME="256"></A>                            in, attributeNameIndex, attributeLength);
<FONT ID="LN">257 </FONT><A NAME="257"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName
<FONT ID="LN">258 </FONT><A NAME="258"></A>                        .equals(ATT_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS)) {
<FONT ID="LN">259 </FONT><A NAME="259"></A>                    attributeInfo = readRuntimeInvisibleParameterAnnotationsAttribute(
<FONT ID="LN">260 </FONT><A NAME="260"></A>                            in, attributeNameIndex, attributeLength);
<FONT ID="LN">261 </FONT><A NAME="261"></A>                } <FONT ID="Else">else</FONT> <FONT ID="If">if</FONT> (attributeName.equals(ATT_ANNOTATION_DEFAULT)) {
<FONT ID="LN">262 </FONT><A NAME="262"></A>                    attributeInfo = readAnnotationDefaultAttribute(in,
<FONT ID="LN">263 </FONT><A NAME="263"></A>                            attributeNameIndex, attributeLength);
<FONT ID="LN">264 </FONT><A NAME="264"></A>                } <FONT ID="Else">else</FONT> {
<FONT ID="LN">265 </FONT><A NAME="265"></A>                    reportWarning(<FONT ID="StringLiteral">"Unknown attribute '%s'"</FONT>, attributeName,
<FONT ID="LN">266 </FONT><A NAME="266"></A>                            className);
<FONT ID="LN">267 </FONT><A NAME="267"></A>                    <FONT ID="For">for</FONT> (<FONT ID="Long">long</FONT> j = <FONT ID="IntegerLiteral">0</FONT>; j &lt; attributeLength; j++) {
<FONT ID="LN">268 </FONT><A NAME="268"></A>                        in.readUnsignedByte();
<FONT ID="LN">269 </FONT><A NAME="269"></A>                    }
<FONT ID="LN">270 </FONT><A NAME="270"></A>                }
<FONT ID="LN">271 </FONT><A NAME="271"></A>                <FONT ID="If">if</FONT> (attributeInfo != <FONT ID="Null">null</FONT>) {
<FONT ID="LN">272 </FONT><A NAME="272"></A>                    attributes.add(attributeInfo);
<FONT ID="LN">273 </FONT><A NAME="273"></A>                }
<FONT ID="LN">274 </FONT><A NAME="274"></A>            }
<FONT ID="LN">275 </FONT><A NAME="275"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">276 </FONT><A NAME="276"></A>            reportError(<FONT ID="StringLiteral">"Error reading attributes from file %s"</FONT>, className);
<FONT ID="LN">277 </FONT><A NAME="277"></A>        }
<FONT ID="LN">278 </FONT><A NAME="278"></A>        <FONT ID="Return">return</FONT> attributes;
<FONT ID="LN">279 </FONT><A NAME="279"></A>    }
<FONT ID="LN">280 </FONT><A NAME="280"></A>
<FONT ID="LN">281 </FONT><A NAME="281"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">282 </FONT><A NAME="282"></A>     * Read a ConstantValue attribute from the specified input stream, and
<FONT ID="LN">283 </FONT><A NAME="283"></A>     * return it.
<FONT ID="LN">284 </FONT><A NAME="284"></A>     * 
<FONT ID="LN">285 </FONT><A NAME="285"></A>     * @param in
<FONT ID="LN">286 </FONT><A NAME="286"></A>     *            input stream.
<FONT ID="LN">287 </FONT><A NAME="287"></A>     * @param attributeNameIndex
<FONT ID="LN">288 </FONT><A NAME="288"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">289 </FONT><A NAME="289"></A>     * @param attributeLength
<FONT ID="LN">290 </FONT><A NAME="290"></A>     *            length of attribute.
<FONT ID="LN">291 </FONT><A NAME="291"></A>     * @return a ConstantValue attribute.
<FONT ID="LN">292 </FONT><A NAME="292"></A>     */</FONT>
<FONT ID="LN">293 </FONT><A NAME="293"></A>
<FONT ID="LN">294 </FONT><A NAME="294"></A>    <FONT ID="Private">private</FONT> CLConstantValueAttribute readConstantValueAttribute(
<FONT ID="LN">295 </FONT><A NAME="295"></A>            CLInputStream in, <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">296 </FONT><A NAME="296"></A>        CLConstantValueAttribute attribute = <FONT ID="Null">null</FONT>;
<FONT ID="LN">297 </FONT><A NAME="297"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">298 </FONT><A NAME="298"></A>            attribute = <FONT ID="New">new</FONT> CLConstantValueAttribute(attributeNameIndex,
<FONT ID="LN">299 </FONT><A NAME="299"></A>                    attributeLength, in.readUnsignedShort());
<FONT ID="LN">300 </FONT><A NAME="300"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">301 </FONT><A NAME="301"></A>            reportError(<FONT ID="StringLiteral">"Error reading ConstantValue_attribute from file %s"</FONT>,
<FONT ID="LN">302 </FONT><A NAME="302"></A>                    className);
<FONT ID="LN">303 </FONT><A NAME="303"></A>        }
<FONT ID="LN">304 </FONT><A NAME="304"></A>        <FONT ID="Return">return</FONT> attribute;
<FONT ID="LN">305 </FONT><A NAME="305"></A>    }
<FONT ID="LN">306 </FONT><A NAME="306"></A>
<FONT ID="LN">307 </FONT><A NAME="307"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">308 </FONT><A NAME="308"></A>     * Read a Code attribute from the specified input stream, and return it.
<FONT ID="LN">309 </FONT><A NAME="309"></A>     * 
<FONT ID="LN">310 </FONT><A NAME="310"></A>     * @param in
<FONT ID="LN">311 </FONT><A NAME="311"></A>     *            input stream.
<FONT ID="LN">312 </FONT><A NAME="312"></A>     * @param attributeNameIndex
<FONT ID="LN">313 </FONT><A NAME="313"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">314 </FONT><A NAME="314"></A>     * @param attributeLength
<FONT ID="LN">315 </FONT><A NAME="315"></A>     *            length of attribute.
<FONT ID="LN">316 </FONT><A NAME="316"></A>     * @return a Code attribute.
<FONT ID="LN">317 </FONT><A NAME="317"></A>     */</FONT>
<FONT ID="LN">318 </FONT><A NAME="318"></A>
<FONT ID="LN">319 </FONT><A NAME="319"></A>    <FONT ID="Private">private</FONT> CLCodeAttribute readCodeAttribute(CLInputStream in,
<FONT ID="LN">320 </FONT><A NAME="320"></A>            <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">321 </FONT><A NAME="321"></A>        CLCodeAttribute attribute = <FONT ID="Null">null</FONT>;
<FONT ID="LN">322 </FONT><A NAME="322"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">323 </FONT><A NAME="323"></A>            <FONT ID="Int">int</FONT> maxStack = in.readUnsignedShort();
<FONT ID="LN">324 </FONT><A NAME="324"></A>            <FONT ID="Int">int</FONT> maxLocals = in.readUnsignedShort();
<FONT ID="LN">325 </FONT><A NAME="325"></A>            ArrayList&lt;Integer&gt; code = <FONT ID="New">new</FONT> ArrayList&lt;Integer&gt;();
<FONT ID="LN">326 </FONT><A NAME="326"></A>            <FONT ID="Long">long</FONT> codeLength = in.readUnsignedInt();
<FONT ID="LN">327 </FONT><A NAME="327"></A>            <FONT ID="For">for</FONT> (<FONT ID="Long">long</FONT> l = <FONT ID="IntegerLiteral">0</FONT>; l &lt; codeLength; l++) {
<FONT ID="LN">328 </FONT><A NAME="328"></A>                code.add(in.readUnsignedByte());
<FONT ID="LN">329 </FONT><A NAME="329"></A>            }
<FONT ID="LN">330 </FONT><A NAME="330"></A>            <FONT ID="Int">int</FONT> exceptionTableLength = in.readUnsignedShort();
<FONT ID="LN">331 </FONT><A NAME="331"></A>            ArrayList&lt;CLExceptionInfo&gt; exceptionTable = <FONT ID="New">new</FONT> ArrayList&lt;CLExceptionInfo&gt;();
<FONT ID="LN">332 </FONT><A NAME="332"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> l = <FONT ID="IntegerLiteral">0</FONT>; l &lt; exceptionTableLength; l++) {
<FONT ID="LN">333 </FONT><A NAME="333"></A>                <FONT ID="Int">int</FONT> startPC = in.readUnsignedShort();
<FONT ID="LN">334 </FONT><A NAME="334"></A>                <FONT ID="Int">int</FONT> endPC = in.readUnsignedShort();
<FONT ID="LN">335 </FONT><A NAME="335"></A>                <FONT ID="Int">int</FONT> handlerPC = in.readUnsignedShort();
<FONT ID="LN">336 </FONT><A NAME="336"></A>                <FONT ID="Int">int</FONT> catchType = in.readUnsignedShort();
<FONT ID="LN">337 </FONT><A NAME="337"></A>                exceptionTable.add(<FONT ID="New">new</FONT> CLExceptionInfo(startPC, endPC,
<FONT ID="LN">338 </FONT><A NAME="338"></A>                        handlerPC, catchType));
<FONT ID="LN">339 </FONT><A NAME="339"></A>            }
<FONT ID="LN">340 </FONT><A NAME="340"></A>            <FONT ID="Int">int</FONT> codeAttrAttributesCount = in.readUnsignedShort();
<FONT ID="LN">341 </FONT><A NAME="341"></A>            ArrayList&lt;<A HREF="../jminusminus/CLAttributeInfo.java.html">CLAttributeInfo</A>&gt; codeAttrAttributes = readAttributes(in,
<FONT ID="LN">342 </FONT><A NAME="342"></A>                    codeAttrAttributesCount);
<FONT ID="LN">343 </FONT><A NAME="343"></A>            attribute = <FONT ID="New">new</FONT> CLCodeAttribute(attributeNameIndex,
<FONT ID="LN">344 </FONT><A NAME="344"></A>                    attributeLength, maxStack, maxLocals, codeLength, code,
<FONT ID="LN">345 </FONT><A NAME="345"></A>                    exceptionTableLength, exceptionTable,
<FONT ID="LN">346 </FONT><A NAME="346"></A>                    codeAttrAttributesCount, codeAttrAttributes);
<FONT ID="LN">347 </FONT><A NAME="347"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">348 </FONT><A NAME="348"></A>            reportError(<FONT ID="StringLiteral">"Error reading Code_attribute from file %s"</FONT>, className);
<FONT ID="LN">349 </FONT><A NAME="349"></A>        }
<FONT ID="LN">350 </FONT><A NAME="350"></A>        <FONT ID="Return">return</FONT> attribute;
<FONT ID="LN">351 </FONT><A NAME="351"></A>    }
<FONT ID="LN">352 </FONT><A NAME="352"></A>
<FONT ID="LN">353 </FONT><A NAME="353"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">354 </FONT><A NAME="354"></A>     * Read an Exceptions attribute from the specified input stream, and return
<FONT ID="LN">355 </FONT><A NAME="355"></A>     * it.
<FONT ID="LN">356 </FONT><A NAME="356"></A>     * 
<FONT ID="LN">357 </FONT><A NAME="357"></A>     * @param in
<FONT ID="LN">358 </FONT><A NAME="358"></A>     *            input stream.
<FONT ID="LN">359 </FONT><A NAME="359"></A>     * @param attributeNameIndex
<FONT ID="LN">360 </FONT><A NAME="360"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">361 </FONT><A NAME="361"></A>     * @param attributeLength
<FONT ID="LN">362 </FONT><A NAME="362"></A>     *            length of attribute.
<FONT ID="LN">363 </FONT><A NAME="363"></A>     * @return an Exceptions attribute.
<FONT ID="LN">364 </FONT><A NAME="364"></A>     */</FONT>
<FONT ID="LN">365 </FONT><A NAME="365"></A>
<FONT ID="LN">366 </FONT><A NAME="366"></A>    <FONT ID="Private">private</FONT> CLExceptionsAttribute readExceptionsAttribute(CLInputStream in,
<FONT ID="LN">367 </FONT><A NAME="367"></A>            <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">368 </FONT><A NAME="368"></A>        CLExceptionsAttribute attribute = <FONT ID="Null">null</FONT>;
<FONT ID="LN">369 </FONT><A NAME="369"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">370 </FONT><A NAME="370"></A>            <FONT ID="Int">int</FONT> numberOfExceptions = in.readUnsignedShort();
<FONT ID="LN">371 </FONT><A NAME="371"></A>            ArrayList&lt;Integer&gt; exceptionIndexTable = <FONT ID="New">new</FONT> ArrayList&lt;Integer&gt;();
<FONT ID="LN">372 </FONT><A NAME="372"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> l = <FONT ID="IntegerLiteral">0</FONT>; l &lt; numberOfExceptions; l++) {
<FONT ID="LN">373 </FONT><A NAME="373"></A>                exceptionIndexTable.add(in.readUnsignedShort());
<FONT ID="LN">374 </FONT><A NAME="374"></A>            }
<FONT ID="LN">375 </FONT><A NAME="375"></A>            attribute = <FONT ID="New">new</FONT> CLExceptionsAttribute(attributeNameIndex,
<FONT ID="LN">376 </FONT><A NAME="376"></A>                    attributeLength, numberOfExceptions, exceptionIndexTable);
<FONT ID="LN">377 </FONT><A NAME="377"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">378 </FONT><A NAME="378"></A>            reportError(<FONT ID="StringLiteral">"Error reading Exceptions_attribute from file %s"</FONT>,
<FONT ID="LN">379 </FONT><A NAME="379"></A>                    className);
<FONT ID="LN">380 </FONT><A NAME="380"></A>        }
<FONT ID="LN">381 </FONT><A NAME="381"></A>        <FONT ID="Return">return</FONT> attribute;
<FONT ID="LN">382 </FONT><A NAME="382"></A>    }
<FONT ID="LN">383 </FONT><A NAME="383"></A>
<FONT ID="LN">384 </FONT><A NAME="384"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">385 </FONT><A NAME="385"></A>     * Read an InnerClasses attribute from the specified input stream, and
<FONT ID="LN">386 </FONT><A NAME="386"></A>     * return it.
<FONT ID="LN">387 </FONT><A NAME="387"></A>     * 
<FONT ID="LN">388 </FONT><A NAME="388"></A>     * @param in
<FONT ID="LN">389 </FONT><A NAME="389"></A>     *            input stream.
<FONT ID="LN">390 </FONT><A NAME="390"></A>     * @param attributeNameIndex
<FONT ID="LN">391 </FONT><A NAME="391"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">392 </FONT><A NAME="392"></A>     * @param attributeLength
<FONT ID="LN">393 </FONT><A NAME="393"></A>     *            length of attribute.
<FONT ID="LN">394 </FONT><A NAME="394"></A>     * @return an InnerClasses attribute.
<FONT ID="LN">395 </FONT><A NAME="395"></A>     */</FONT>
<FONT ID="LN">396 </FONT><A NAME="396"></A>
<FONT ID="LN">397 </FONT><A NAME="397"></A>    <FONT ID="Private">private</FONT> CLInnerClassesAttribute readInnerClassesAttribute(CLInputStream in,
<FONT ID="LN">398 </FONT><A NAME="398"></A>            <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">399 </FONT><A NAME="399"></A>        CLInnerClassesAttribute attribute = <FONT ID="Null">null</FONT>;
<FONT ID="LN">400 </FONT><A NAME="400"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">401 </FONT><A NAME="401"></A>            <FONT ID="Int">int</FONT> numberOfClasses = in.readUnsignedShort();
<FONT ID="LN">402 </FONT><A NAME="402"></A>            ArrayList&lt;CLInnerClassInfo&gt; classes = <FONT ID="New">new</FONT> ArrayList&lt;CLInnerClassInfo&gt;();
<FONT ID="LN">403 </FONT><A NAME="403"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> m = <FONT ID="IntegerLiteral">0</FONT>; m &lt; numberOfClasses; m++) {
<FONT ID="LN">404 </FONT><A NAME="404"></A>                classes.add(<FONT ID="New">new</FONT> CLInnerClassInfo(in.readUnsignedShort(), in
<FONT ID="LN">405 </FONT><A NAME="405"></A>                        .readUnsignedShort(), in.readUnsignedShort(), in
<FONT ID="LN">406 </FONT><A NAME="406"></A>                        .readUnsignedShort()));
<FONT ID="LN">407 </FONT><A NAME="407"></A>            }
<FONT ID="LN">408 </FONT><A NAME="408"></A>            attribute = <FONT ID="New">new</FONT> CLInnerClassesAttribute(attributeNameIndex,
<FONT ID="LN">409 </FONT><A NAME="409"></A>                    attributeLength, numberOfClasses, classes);
<FONT ID="LN">410 </FONT><A NAME="410"></A>
<FONT ID="LN">411 </FONT><A NAME="411"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">412 </FONT><A NAME="412"></A>            reportError(<FONT ID="StringLiteral">"Error reading InnerClasses_attribute from file %s"</FONT>,
<FONT ID="LN">413 </FONT><A NAME="413"></A>                    className);
<FONT ID="LN">414 </FONT><A NAME="414"></A>        }
<FONT ID="LN">415 </FONT><A NAME="415"></A>        <FONT ID="Return">return</FONT> attribute;
<FONT ID="LN">416 </FONT><A NAME="416"></A>    }
<FONT ID="LN">417 </FONT><A NAME="417"></A>
<FONT ID="LN">418 </FONT><A NAME="418"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">419 </FONT><A NAME="419"></A>     * Read an EnclosingMethod attribute from the specified input stream, and
<FONT ID="LN">420 </FONT><A NAME="420"></A>     * return it.
<FONT ID="LN">421 </FONT><A NAME="421"></A>     * 
<FONT ID="LN">422 </FONT><A NAME="422"></A>     * @param in
<FONT ID="LN">423 </FONT><A NAME="423"></A>     *            input stream.
<FONT ID="LN">424 </FONT><A NAME="424"></A>     * @param attributeNameIndex
<FONT ID="LN">425 </FONT><A NAME="425"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">426 </FONT><A NAME="426"></A>     * @param attributeLength
<FONT ID="LN">427 </FONT><A NAME="427"></A>     *            length of attribute.
<FONT ID="LN">428 </FONT><A NAME="428"></A>     * @return an EnclosingMethod attribute.
<FONT ID="LN">429 </FONT><A NAME="429"></A>     */</FONT>
<FONT ID="LN">430 </FONT><A NAME="430"></A>
<FONT ID="LN">431 </FONT><A NAME="431"></A>    <FONT ID="Private">private</FONT> CLEnclosingMethodAttribute readEnclosingMethodAttribute(
<FONT ID="LN">432 </FONT><A NAME="432"></A>            CLInputStream in, <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">433 </FONT><A NAME="433"></A>        CLEnclosingMethodAttribute attribute = <FONT ID="Null">null</FONT>;
<FONT ID="LN">434 </FONT><A NAME="434"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">435 </FONT><A NAME="435"></A>            attribute = <FONT ID="New">new</FONT> CLEnclosingMethodAttribute(attributeNameIndex,
<FONT ID="LN">436 </FONT><A NAME="436"></A>                    attributeLength, in.readUnsignedShort(), in
<FONT ID="LN">437 </FONT><A NAME="437"></A>                            .readUnsignedShort());
<FONT ID="LN">438 </FONT><A NAME="438"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">439 </FONT><A NAME="439"></A>            reportError(<FONT ID="StringLiteral">"Error reading EnclosingMethod_attribute from file %s"</FONT>,
<FONT ID="LN">440 </FONT><A NAME="440"></A>                    className);
<FONT ID="LN">441 </FONT><A NAME="441"></A>        }
<FONT ID="LN">442 </FONT><A NAME="442"></A>        <FONT ID="Return">return</FONT> attribute;
<FONT ID="LN">443 </FONT><A NAME="443"></A>    }
<FONT ID="LN">444 </FONT><A NAME="444"></A>
<FONT ID="LN">445 </FONT><A NAME="445"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">446 </FONT><A NAME="446"></A>     * Read a Synthetic attribute from the specified input stream, and return
<FONT ID="LN">447 </FONT><A NAME="447"></A>     * it.
<FONT ID="LN">448 </FONT><A NAME="448"></A>     * 
<FONT ID="LN">449 </FONT><A NAME="449"></A>     * @param in
<FONT ID="LN">450 </FONT><A NAME="450"></A>     *            input stream.
<FONT ID="LN">451 </FONT><A NAME="451"></A>     * @param attributeNameIndex
<FONT ID="LN">452 </FONT><A NAME="452"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">453 </FONT><A NAME="453"></A>     * @param attributeLength
<FONT ID="LN">454 </FONT><A NAME="454"></A>     *            length of attribute.
<FONT ID="LN">455 </FONT><A NAME="455"></A>     * @return a Synthetic attribute.
<FONT ID="LN">456 </FONT><A NAME="456"></A>     */</FONT>
<FONT ID="LN">457 </FONT><A NAME="457"></A>
<FONT ID="LN">458 </FONT><A NAME="458"></A>    <FONT ID="Private">private</FONT> CLSyntheticAttribute readSyntheticAttribute(CLInputStream in,
<FONT ID="LN">459 </FONT><A NAME="459"></A>            <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">460 </FONT><A NAME="460"></A>        <FONT ID="Return">return</FONT> <FONT ID="New">new</FONT> CLSyntheticAttribute(attributeNameIndex, attributeLength);
<FONT ID="LN">461 </FONT><A NAME="461"></A>    }
<FONT ID="LN">462 </FONT><A NAME="462"></A>
<FONT ID="LN">463 </FONT><A NAME="463"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">464 </FONT><A NAME="464"></A>     * Read a Signature attribute from the specified input stream, and return
<FONT ID="LN">465 </FONT><A NAME="465"></A>     * it.
<FONT ID="LN">466 </FONT><A NAME="466"></A>     * 
<FONT ID="LN">467 </FONT><A NAME="467"></A>     * @param in
<FONT ID="LN">468 </FONT><A NAME="468"></A>     *            input stream.
<FONT ID="LN">469 </FONT><A NAME="469"></A>     * @param attributeNameIndex
<FONT ID="LN">470 </FONT><A NAME="470"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">471 </FONT><A NAME="471"></A>     * @param attributeLength
<FONT ID="LN">472 </FONT><A NAME="472"></A>     *            length of attribute.
<FONT ID="LN">473 </FONT><A NAME="473"></A>     * @return a Signature attribute.
<FONT ID="LN">474 </FONT><A NAME="474"></A>     */</FONT>
<FONT ID="LN">475 </FONT><A NAME="475"></A>
<FONT ID="LN">476 </FONT><A NAME="476"></A>    <FONT ID="Private">private</FONT> CLSignatureAttribute readSignatureAttribute(CLInputStream in,
<FONT ID="LN">477 </FONT><A NAME="477"></A>            <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">478 </FONT><A NAME="478"></A>        CLSignatureAttribute attribute = <FONT ID="Null">null</FONT>;
<FONT ID="LN">479 </FONT><A NAME="479"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">480 </FONT><A NAME="480"></A>            attribute = <FONT ID="New">new</FONT> CLSignatureAttribute(attributeNameIndex,
<FONT ID="LN">481 </FONT><A NAME="481"></A>                    attributeLength, in.readUnsignedShort());
<FONT ID="LN">482 </FONT><A NAME="482"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">483 </FONT><A NAME="483"></A>            reportError(<FONT ID="StringLiteral">"Error reading Signature_attribute from file %s"</FONT>,
<FONT ID="LN">484 </FONT><A NAME="484"></A>                    className);
<FONT ID="LN">485 </FONT><A NAME="485"></A>        }
<FONT ID="LN">486 </FONT><A NAME="486"></A>        <FONT ID="Return">return</FONT> attribute;
<FONT ID="LN">487 </FONT><A NAME="487"></A>    }
<FONT ID="LN">488 </FONT><A NAME="488"></A>
<FONT ID="LN">489 </FONT><A NAME="489"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">490 </FONT><A NAME="490"></A>     * Read a SourceFile attribute from the specified input stream, and return
<FONT ID="LN">491 </FONT><A NAME="491"></A>     * it.
<FONT ID="LN">492 </FONT><A NAME="492"></A>     * 
<FONT ID="LN">493 </FONT><A NAME="493"></A>     * @param in
<FONT ID="LN">494 </FONT><A NAME="494"></A>     *            input stream.
<FONT ID="LN">495 </FONT><A NAME="495"></A>     * @param attributeNameIndex
<FONT ID="LN">496 </FONT><A NAME="496"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">497 </FONT><A NAME="497"></A>     * @param attributeLength
<FONT ID="LN">498 </FONT><A NAME="498"></A>     *            length of attribute.
<FONT ID="LN">499 </FONT><A NAME="499"></A>     * @return a SourceFile attribute.
<FONT ID="LN">500 </FONT><A NAME="500"></A>     */</FONT>
<FONT ID="LN">501 </FONT><A NAME="501"></A>
<FONT ID="LN">502 </FONT><A NAME="502"></A>    <FONT ID="Private">private</FONT> CLSourceFileAttribute readSourceFileAttribute(CLInputStream in,
<FONT ID="LN">503 </FONT><A NAME="503"></A>            <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">504 </FONT><A NAME="504"></A>        CLSourceFileAttribute attribute = <FONT ID="Null">null</FONT>;
<FONT ID="LN">505 </FONT><A NAME="505"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">506 </FONT><A NAME="506"></A>            attribute = <FONT ID="New">new</FONT> CLSourceFileAttribute(attributeNameIndex,
<FONT ID="LN">507 </FONT><A NAME="507"></A>                    attributeLength, in.readUnsignedShort());
<FONT ID="LN">508 </FONT><A NAME="508"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">509 </FONT><A NAME="509"></A>            reportError(<FONT ID="StringLiteral">"Error reading SourceFile_attribute from file %s"</FONT>,
<FONT ID="LN">510 </FONT><A NAME="510"></A>                    className);
<FONT ID="LN">511 </FONT><A NAME="511"></A>        }
<FONT ID="LN">512 </FONT><A NAME="512"></A>        <FONT ID="Return">return</FONT> attribute;
<FONT ID="LN">513 </FONT><A NAME="513"></A>    }
<FONT ID="LN">514 </FONT><A NAME="514"></A>
<FONT ID="LN">515 </FONT><A NAME="515"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">516 </FONT><A NAME="516"></A>     * Read a SourceDebugExtension attribute from the specified input stream,
<FONT ID="LN">517 </FONT><A NAME="517"></A>     * and return it.
<FONT ID="LN">518 </FONT><A NAME="518"></A>     * 
<FONT ID="LN">519 </FONT><A NAME="519"></A>     * @param in
<FONT ID="LN">520 </FONT><A NAME="520"></A>     *            input stream.
<FONT ID="LN">521 </FONT><A NAME="521"></A>     * @param attributeNameIndex
<FONT ID="LN">522 </FONT><A NAME="522"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">523 </FONT><A NAME="523"></A>     * @param attributeLength
<FONT ID="LN">524 </FONT><A NAME="524"></A>     *            length of attribute.
<FONT ID="LN">525 </FONT><A NAME="525"></A>     * @return a SourceDebugExtension attribute.
<FONT ID="LN">526 </FONT><A NAME="526"></A>     */</FONT>
<FONT ID="LN">527 </FONT><A NAME="527"></A>
<FONT ID="LN">528 </FONT><A NAME="528"></A>    <FONT ID="Private">private</FONT> CLSourceDebugExtensionAttribute readSourceDebugExtensionAttribute(
<FONT ID="LN">529 </FONT><A NAME="529"></A>            CLInputStream in, <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">530 </FONT><A NAME="530"></A>        CLSourceDebugExtensionAttribute attribute = <FONT ID="Null">null</FONT>;
<FONT ID="LN">531 </FONT><A NAME="531"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">532 </FONT><A NAME="532"></A>            <FONT ID="Byte">byte</FONT>[] b = <FONT ID="New">new</FONT> <FONT ID="Byte">byte</FONT>[(<FONT ID="Int">int</FONT>) attributeLength];
<FONT ID="LN">533 </FONT><A NAME="533"></A>
<FONT ID="LN">534 </FONT><A NAME="534"></A>            in.read(b);
<FONT ID="LN">535 </FONT><A NAME="535"></A>            attribute = <FONT ID="New">new</FONT> CLSourceDebugExtensionAttribute(attributeNameIndex,
<FONT ID="LN">536 </FONT><A NAME="536"></A>                    attributeLength, b);
<FONT ID="LN">537 </FONT><A NAME="537"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">538 </FONT><A NAME="538"></A>            reportError(<FONT ID="StringLiteral">"Error reading SourceDebugExtension_attribute "</FONT>
<FONT ID="LN">539 </FONT><A NAME="539"></A>                    + <FONT ID="StringLiteral">"from file %s"</FONT>, className);
<FONT ID="LN">540 </FONT><A NAME="540"></A>        }
<FONT ID="LN">541 </FONT><A NAME="541"></A>        <FONT ID="Return">return</FONT> attribute;
<FONT ID="LN">542 </FONT><A NAME="542"></A>    }
<FONT ID="LN">543 </FONT><A NAME="543"></A>
<FONT ID="LN">544 </FONT><A NAME="544"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">545 </FONT><A NAME="545"></A>     * Read a LineNumberTable attribute from the specified input stream, and
<FONT ID="LN">546 </FONT><A NAME="546"></A>     * return it.
<FONT ID="LN">547 </FONT><A NAME="547"></A>     * 
<FONT ID="LN">548 </FONT><A NAME="548"></A>     * @param in
<FONT ID="LN">549 </FONT><A NAME="549"></A>     *            input stream.
<FONT ID="LN">550 </FONT><A NAME="550"></A>     * @param attributeNameIndex
<FONT ID="LN">551 </FONT><A NAME="551"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">552 </FONT><A NAME="552"></A>     * @param attributeLength
<FONT ID="LN">553 </FONT><A NAME="553"></A>     *            length of attribute.
<FONT ID="LN">554 </FONT><A NAME="554"></A>     * @return a LineNumberTable attribute.
<FONT ID="LN">555 </FONT><A NAME="555"></A>     */</FONT>
<FONT ID="LN">556 </FONT><A NAME="556"></A>
<FONT ID="LN">557 </FONT><A NAME="557"></A>    <FONT ID="Private">private</FONT> CLLineNumberTableAttribute readLineNumberTableAttribute(
<FONT ID="LN">558 </FONT><A NAME="558"></A>            CLInputStream in, <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">559 </FONT><A NAME="559"></A>        CLLineNumberTableAttribute attribute = <FONT ID="Null">null</FONT>;
<FONT ID="LN">560 </FONT><A NAME="560"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">561 </FONT><A NAME="561"></A>            <FONT ID="Int">int</FONT> lineNumberTableLength = in.readUnsignedShort();
<FONT ID="LN">562 </FONT><A NAME="562"></A>            ArrayList&lt;CLLineNumberInfo&gt; lineNumberTable = <FONT ID="New">new</FONT> ArrayList&lt;CLLineNumberInfo&gt;();
<FONT ID="LN">563 </FONT><A NAME="563"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> m = <FONT ID="IntegerLiteral">0</FONT>; m &lt; lineNumberTableLength; m++) {
<FONT ID="LN">564 </FONT><A NAME="564"></A>                lineNumberTable.add(<FONT ID="New">new</FONT> CLLineNumberInfo(
<FONT ID="LN">565 </FONT><A NAME="565"></A>                        in.readUnsignedShort(), in.readUnsignedShort()));
<FONT ID="LN">566 </FONT><A NAME="566"></A>            }
<FONT ID="LN">567 </FONT><A NAME="567"></A>            attribute = <FONT ID="New">new</FONT> CLLineNumberTableAttribute(attributeNameIndex,
<FONT ID="LN">568 </FONT><A NAME="568"></A>                    attributeLength, lineNumberTableLength, lineNumberTable);
<FONT ID="LN">569 </FONT><A NAME="569"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">570 </FONT><A NAME="570"></A>            reportError(<FONT ID="StringLiteral">"Error reading LineNumberTable_attribute from file %s"</FONT>,
<FONT ID="LN">571 </FONT><A NAME="571"></A>                    className);
<FONT ID="LN">572 </FONT><A NAME="572"></A>        }
<FONT ID="LN">573 </FONT><A NAME="573"></A>        <FONT ID="Return">return</FONT> attribute;
<FONT ID="LN">574 </FONT><A NAME="574"></A>    }
<FONT ID="LN">575 </FONT><A NAME="575"></A>
<FONT ID="LN">576 </FONT><A NAME="576"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">577 </FONT><A NAME="577"></A>     * Read a LocalVariableTable attribute from the specified input stream, and
<FONT ID="LN">578 </FONT><A NAME="578"></A>     * return it.
<FONT ID="LN">579 </FONT><A NAME="579"></A>     * 
<FONT ID="LN">580 </FONT><A NAME="580"></A>     * @param in
<FONT ID="LN">581 </FONT><A NAME="581"></A>     *            input stream.
<FONT ID="LN">582 </FONT><A NAME="582"></A>     * @param attributeNameIndex
<FONT ID="LN">583 </FONT><A NAME="583"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">584 </FONT><A NAME="584"></A>     * @param attributeLength
<FONT ID="LN">585 </FONT><A NAME="585"></A>     *            length of attribute.
<FONT ID="LN">586 </FONT><A NAME="586"></A>     * @return a LocalVariableTable attribute.
<FONT ID="LN">587 </FONT><A NAME="587"></A>     */</FONT>
<FONT ID="LN">588 </FONT><A NAME="588"></A>
<FONT ID="LN">589 </FONT><A NAME="589"></A>    <FONT ID="Private">private</FONT> CLLocalVariableTableAttribute readLocalVariableTableAttribute(
<FONT ID="LN">590 </FONT><A NAME="590"></A>            CLInputStream in, <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">591 </FONT><A NAME="591"></A>        CLLocalVariableTableAttribute attribute = <FONT ID="Null">null</FONT>;
<FONT ID="LN">592 </FONT><A NAME="592"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">593 </FONT><A NAME="593"></A>            <FONT ID="Int">int</FONT> localVariableTableLength = in.readUnsignedShort();
<FONT ID="LN">594 </FONT><A NAME="594"></A>            ArrayList&lt;CLLocalVariableInfo&gt; localVariableTable = <FONT ID="New">new</FONT> ArrayList&lt;CLLocalVariableInfo&gt;();
<FONT ID="LN">595 </FONT><A NAME="595"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> m = <FONT ID="IntegerLiteral">0</FONT>; m &lt; localVariableTableLength; m++) {
<FONT ID="LN">596 </FONT><A NAME="596"></A>                localVariableTable.add(<FONT ID="New">new</FONT> CLLocalVariableInfo(in
<FONT ID="LN">597 </FONT><A NAME="597"></A>                        .readUnsignedShort(), in.readUnsignedShort(), in
<FONT ID="LN">598 </FONT><A NAME="598"></A>                        .readUnsignedShort(), in.readUnsignedShort(), in
<FONT ID="LN">599 </FONT><A NAME="599"></A>                        .readUnsignedShort()));
<FONT ID="LN">600 </FONT><A NAME="600"></A>            }
<FONT ID="LN">601 </FONT><A NAME="601"></A>            attribute = <FONT ID="New">new</FONT> CLLocalVariableTableAttribute(attributeNameIndex,
<FONT ID="LN">602 </FONT><A NAME="602"></A>                    attributeLength, localVariableTableLength,
<FONT ID="LN">603 </FONT><A NAME="603"></A>                    localVariableTable);
<FONT ID="LN">604 </FONT><A NAME="604"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">605 </FONT><A NAME="605"></A>            reportError(<FONT ID="StringLiteral">"Error reading LocalVariableTable_attribute "</FONT>
<FONT ID="LN">606 </FONT><A NAME="606"></A>                    + <FONT ID="StringLiteral">"from file %s"</FONT>, className);
<FONT ID="LN">607 </FONT><A NAME="607"></A>        }
<FONT ID="LN">608 </FONT><A NAME="608"></A>        <FONT ID="Return">return</FONT> attribute;
<FONT ID="LN">609 </FONT><A NAME="609"></A>    }
<FONT ID="LN">610 </FONT><A NAME="610"></A>
<FONT ID="LN">611 </FONT><A NAME="611"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">612 </FONT><A NAME="612"></A>     * Read a LocalVariableTypeTable attribute from the specified input stream,
<FONT ID="LN">613 </FONT><A NAME="613"></A>     * and return it.
<FONT ID="LN">614 </FONT><A NAME="614"></A>     * 
<FONT ID="LN">615 </FONT><A NAME="615"></A>     * @param in
<FONT ID="LN">616 </FONT><A NAME="616"></A>     *            input stream.
<FONT ID="LN">617 </FONT><A NAME="617"></A>     * @param attributeNameIndex
<FONT ID="LN">618 </FONT><A NAME="618"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">619 </FONT><A NAME="619"></A>     * @param attributeLength
<FONT ID="LN">620 </FONT><A NAME="620"></A>     *            length of attribute.
<FONT ID="LN">621 </FONT><A NAME="621"></A>     * @return a LocalVariableTypeTable attribute.
<FONT ID="LN">622 </FONT><A NAME="622"></A>     */</FONT>
<FONT ID="LN">623 </FONT><A NAME="623"></A>
<FONT ID="LN">624 </FONT><A NAME="624"></A>    <FONT ID="Private">private</FONT> CLLocalVariableTypeTableAttribute readLocalVariableTypeTableAttribute(
<FONT ID="LN">625 </FONT><A NAME="625"></A>            CLInputStream in, <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">626 </FONT><A NAME="626"></A>        CLLocalVariableTypeTableAttribute attribute = <FONT ID="Null">null</FONT>;
<FONT ID="LN">627 </FONT><A NAME="627"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">628 </FONT><A NAME="628"></A>            <FONT ID="Int">int</FONT> localVariableTypeTableLength = in.readUnsignedShort();
<FONT ID="LN">629 </FONT><A NAME="629"></A>            ArrayList&lt;CLLocalVariableTypeInfo&gt; localVariableTypeTable = <FONT ID="New">new</FONT> ArrayList&lt;CLLocalVariableTypeInfo&gt;();
<FONT ID="LN">630 </FONT><A NAME="630"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> m = <FONT ID="IntegerLiteral">0</FONT>; m &lt; localVariableTypeTableLength; m++) {
<FONT ID="LN">631 </FONT><A NAME="631"></A>                localVariableTypeTable.add(<FONT ID="New">new</FONT> CLLocalVariableTypeInfo(in
<FONT ID="LN">632 </FONT><A NAME="632"></A>                        .readUnsignedShort(), in.readUnsignedShort(), in
<FONT ID="LN">633 </FONT><A NAME="633"></A>                        .readUnsignedShort(), in.readUnsignedShort(), in
<FONT ID="LN">634 </FONT><A NAME="634"></A>                        .readUnsignedShort()));
<FONT ID="LN">635 </FONT><A NAME="635"></A>            }
<FONT ID="LN">636 </FONT><A NAME="636"></A>            attribute = <FONT ID="New">new</FONT> CLLocalVariableTypeTableAttribute(
<FONT ID="LN">637 </FONT><A NAME="637"></A>                    attributeNameIndex, attributeLength,
<FONT ID="LN">638 </FONT><A NAME="638"></A>                    localVariableTypeTableLength, localVariableTypeTable);
<FONT ID="LN">639 </FONT><A NAME="639"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">640 </FONT><A NAME="640"></A>            reportError(<FONT ID="StringLiteral">"Error reading LocalVariableTypeTable_attribute"</FONT>
<FONT ID="LN">641 </FONT><A NAME="641"></A>                    + <FONT ID="StringLiteral">"file %s"</FONT>, className);
<FONT ID="LN">642 </FONT><A NAME="642"></A>        }
<FONT ID="LN">643 </FONT><A NAME="643"></A>        <FONT ID="Return">return</FONT> attribute;
<FONT ID="LN">644 </FONT><A NAME="644"></A>    }
<FONT ID="LN">645 </FONT><A NAME="645"></A>
<FONT ID="LN">646 </FONT><A NAME="646"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">647 </FONT><A NAME="647"></A>     * Read a Deprecated attribute from the specified input stream, and return
<FONT ID="LN">648 </FONT><A NAME="648"></A>     * it.
<FONT ID="LN">649 </FONT><A NAME="649"></A>     * 
<FONT ID="LN">650 </FONT><A NAME="650"></A>     * @param in
<FONT ID="LN">651 </FONT><A NAME="651"></A>     *            input stream.
<FONT ID="LN">652 </FONT><A NAME="652"></A>     * @param attributeNameIndex
<FONT ID="LN">653 </FONT><A NAME="653"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">654 </FONT><A NAME="654"></A>     * @param attributeLength
<FONT ID="LN">655 </FONT><A NAME="655"></A>     *            length of attribute.
<FONT ID="LN">656 </FONT><A NAME="656"></A>     * @return a Deprecated attribute.
<FONT ID="LN">657 </FONT><A NAME="657"></A>     */</FONT>
<FONT ID="LN">658 </FONT><A NAME="658"></A>
<FONT ID="LN">659 </FONT><A NAME="659"></A>    <FONT ID="Private">private</FONT> CLDeprecatedAttribute readDeprecatedAttribute(CLInputStream in,
<FONT ID="LN">660 </FONT><A NAME="660"></A>            <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">661 </FONT><A NAME="661"></A>        <FONT ID="Return">return</FONT> <FONT ID="New">new</FONT> CLDeprecatedAttribute(attributeNameIndex, attributeLength);
<FONT ID="LN">662 </FONT><A NAME="662"></A>    }
<FONT ID="LN">663 </FONT><A NAME="663"></A>
<FONT ID="LN">664 </FONT><A NAME="664"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">665 </FONT><A NAME="665"></A>     * Read a RuntimeVisibleAnnotations attribute from the specified input
<FONT ID="LN">666 </FONT><A NAME="666"></A>     * stream, and return it.
<FONT ID="LN">667 </FONT><A NAME="667"></A>     * 
<FONT ID="LN">668 </FONT><A NAME="668"></A>     * @param in
<FONT ID="LN">669 </FONT><A NAME="669"></A>     *            input stream.
<FONT ID="LN">670 </FONT><A NAME="670"></A>     * @param attributeNameIndex
<FONT ID="LN">671 </FONT><A NAME="671"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">672 </FONT><A NAME="672"></A>     * @param attributeLength
<FONT ID="LN">673 </FONT><A NAME="673"></A>     *            length of attribute.
<FONT ID="LN">674 </FONT><A NAME="674"></A>     * @return a RuntimeVisibleAnnotations attribute.
<FONT ID="LN">675 </FONT><A NAME="675"></A>     */</FONT>
<FONT ID="LN">676 </FONT><A NAME="676"></A>
<FONT ID="LN">677 </FONT><A NAME="677"></A>    <FONT ID="Private">private</FONT> CLRuntimeVisibleAnnotationsAttribute readRuntimeVisibleAnnotationsAttribute(
<FONT ID="LN">678 </FONT><A NAME="678"></A>            CLInputStream in, <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">679 </FONT><A NAME="679"></A>        CLRuntimeVisibleAnnotationsAttribute attribute = <FONT ID="Null">null</FONT>;
<FONT ID="LN">680 </FONT><A NAME="680"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">681 </FONT><A NAME="681"></A>            <FONT ID="Int">int</FONT> numAnnotations = in.readUnsignedShort();
<FONT ID="LN">682 </FONT><A NAME="682"></A>            ArrayList&lt;CLAnnotation&gt; annotations = <FONT ID="New">new</FONT> ArrayList&lt;CLAnnotation&gt;();
<FONT ID="LN">683 </FONT><A NAME="683"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> i = <FONT ID="IntegerLiteral">0</FONT>; i &lt; numAnnotations; i++) {
<FONT ID="LN">684 </FONT><A NAME="684"></A>                CLAnnotation annotation = readAnnotation(in);
<FONT ID="LN">685 </FONT><A NAME="685"></A>                annotations.add(annotation);
<FONT ID="LN">686 </FONT><A NAME="686"></A>            }
<FONT ID="LN">687 </FONT><A NAME="687"></A>            attribute = <FONT ID="New">new</FONT> CLRuntimeVisibleAnnotationsAttribute(
<FONT ID="LN">688 </FONT><A NAME="688"></A>                    attributeNameIndex, attributeLength, numAnnotations,
<FONT ID="LN">689 </FONT><A NAME="689"></A>                    annotations);
<FONT ID="LN">690 </FONT><A NAME="690"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">691 </FONT><A NAME="691"></A>            reportError(<FONT ID="StringLiteral">"Error reading RuntimeVisibleAnnotations_attribute"</FONT>
<FONT ID="LN">692 </FONT><A NAME="692"></A>                    + <FONT ID="StringLiteral">"from file %s"</FONT>, className);
<FONT ID="LN">693 </FONT><A NAME="693"></A>        }
<FONT ID="LN">694 </FONT><A NAME="694"></A>        <FONT ID="Return">return</FONT> attribute;
<FONT ID="LN">695 </FONT><A NAME="695"></A>    }
<FONT ID="LN">696 </FONT><A NAME="696"></A>
<FONT ID="LN">697 </FONT><A NAME="697"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">698 </FONT><A NAME="698"></A>     * Read a RuntimeInvisibleAnnotations attribute from the specified input
<FONT ID="LN">699 </FONT><A NAME="699"></A>     * stream, and return it.
<FONT ID="LN">700 </FONT><A NAME="700"></A>     * 
<FONT ID="LN">701 </FONT><A NAME="701"></A>     * @param in
<FONT ID="LN">702 </FONT><A NAME="702"></A>     *            input stream.
<FONT ID="LN">703 </FONT><A NAME="703"></A>     * @param attributeNameIndex
<FONT ID="LN">704 </FONT><A NAME="704"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">705 </FONT><A NAME="705"></A>     * @param attributeLength
<FONT ID="LN">706 </FONT><A NAME="706"></A>     *            length of attribute.
<FONT ID="LN">707 </FONT><A NAME="707"></A>     * @return a RuntimeInvisibleAnnotations attribute.
<FONT ID="LN">708 </FONT><A NAME="708"></A>     */</FONT>
<FONT ID="LN">709 </FONT><A NAME="709"></A>
<FONT ID="LN">710 </FONT><A NAME="710"></A>    <FONT ID="Private">private</FONT> CLRuntimeInvisibleAnnotationsAttribute readRuntimeInvisibleAnnotationsAttribute(
<FONT ID="LN">711 </FONT><A NAME="711"></A>            CLInputStream in, <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">712 </FONT><A NAME="712"></A>        CLRuntimeInvisibleAnnotationsAttribute attribute = <FONT ID="Null">null</FONT>;
<FONT ID="LN">713 </FONT><A NAME="713"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">714 </FONT><A NAME="714"></A>            <FONT ID="Int">int</FONT> numAnnotations = in.readUnsignedShort();
<FONT ID="LN">715 </FONT><A NAME="715"></A>            ArrayList&lt;CLAnnotation&gt; annotations = <FONT ID="New">new</FONT> ArrayList&lt;CLAnnotation&gt;();
<FONT ID="LN">716 </FONT><A NAME="716"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> i = <FONT ID="IntegerLiteral">0</FONT>; i &lt; numAnnotations; i++) {
<FONT ID="LN">717 </FONT><A NAME="717"></A>                CLAnnotation annotation = readAnnotation(in);
<FONT ID="LN">718 </FONT><A NAME="718"></A>                annotations.add(annotation);
<FONT ID="LN">719 </FONT><A NAME="719"></A>            }
<FONT ID="LN">720 </FONT><A NAME="720"></A>            attribute = <FONT ID="New">new</FONT> CLRuntimeInvisibleAnnotationsAttribute(
<FONT ID="LN">721 </FONT><A NAME="721"></A>                    attributeNameIndex, attributeLength, numAnnotations,
<FONT ID="LN">722 </FONT><A NAME="722"></A>                    annotations);
<FONT ID="LN">723 </FONT><A NAME="723"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">724 </FONT><A NAME="724"></A>            reportError(<FONT ID="StringLiteral">"Error reading RuntimeInvisibleAnnotations_attribute"</FONT>
<FONT ID="LN">725 </FONT><A NAME="725"></A>                    + <FONT ID="StringLiteral">"from file %s"</FONT>, className);
<FONT ID="LN">726 </FONT><A NAME="726"></A>        }
<FONT ID="LN">727 </FONT><A NAME="727"></A>        <FONT ID="Return">return</FONT> attribute;
<FONT ID="LN">728 </FONT><A NAME="728"></A>    }
<FONT ID="LN">729 </FONT><A NAME="729"></A>
<FONT ID="LN">730 </FONT><A NAME="730"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">731 </FONT><A NAME="731"></A>     * Read a RuntimeVisibleParameterAnnotations attribute from the specified
<FONT ID="LN">732 </FONT><A NAME="732"></A>     * input stream, and return it.
<FONT ID="LN">733 </FONT><A NAME="733"></A>     * 
<FONT ID="LN">734 </FONT><A NAME="734"></A>     * @param in
<FONT ID="LN">735 </FONT><A NAME="735"></A>     *            input stream.
<FONT ID="LN">736 </FONT><A NAME="736"></A>     * @param attributeNameIndex
<FONT ID="LN">737 </FONT><A NAME="737"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">738 </FONT><A NAME="738"></A>     * @param attributeLength
<FONT ID="LN">739 </FONT><A NAME="739"></A>     *            length of attribute.
<FONT ID="LN">740 </FONT><A NAME="740"></A>     * @return a RuntimeVisibleParameterAnnotations attribute.
<FONT ID="LN">741 </FONT><A NAME="741"></A>     */</FONT>
<FONT ID="LN">742 </FONT><A NAME="742"></A>
<FONT ID="LN">743 </FONT><A NAME="743"></A>    <FONT ID="Private">private</FONT> CLRuntimeVisibleParameterAnnotationsAttribute readRuntimeVisibleParameterAnnotationsAttribute(
<FONT ID="LN">744 </FONT><A NAME="744"></A>            CLInputStream in, <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">745 </FONT><A NAME="745"></A>        CLRuntimeVisibleParameterAnnotationsAttribute attribute = <FONT ID="Null">null</FONT>;
<FONT ID="LN">746 </FONT><A NAME="746"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">747 </FONT><A NAME="747"></A>            <FONT ID="Int">int</FONT> numParameters = in.readUnsignedByte();
<FONT ID="LN">748 </FONT><A NAME="748"></A>            ArrayList&lt;CLParameterAnnotationInfo&gt; parameterAnnotations = <FONT ID="New">new</FONT> ArrayList&lt;CLParameterAnnotationInfo&gt;();
<FONT ID="LN">749 </FONT><A NAME="749"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> i = <FONT ID="IntegerLiteral">0</FONT>; i &lt; numParameters; i++) {
<FONT ID="LN">750 </FONT><A NAME="750"></A>                <FONT ID="Int">int</FONT> numAnnotations = in.readUnsignedShort();
<FONT ID="LN">751 </FONT><A NAME="751"></A>                ArrayList&lt;CLAnnotation&gt; annotations = <FONT ID="New">new</FONT> ArrayList&lt;CLAnnotation&gt;();
<FONT ID="LN">752 </FONT><A NAME="752"></A>                <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> j = <FONT ID="IntegerLiteral">0</FONT>; j &lt; numAnnotations; j++) {
<FONT ID="LN">753 </FONT><A NAME="753"></A>                    CLAnnotation annotation = readAnnotation(in);
<FONT ID="LN">754 </FONT><A NAME="754"></A>                    annotations.add(annotation);
<FONT ID="LN">755 </FONT><A NAME="755"></A>                }
<FONT ID="LN">756 </FONT><A NAME="756"></A>                parameterAnnotations.add(<FONT ID="New">new</FONT> CLParameterAnnotationInfo(
<FONT ID="LN">757 </FONT><A NAME="757"></A>                        numAnnotations, annotations));
<FONT ID="LN">758 </FONT><A NAME="758"></A>            }
<FONT ID="LN">759 </FONT><A NAME="759"></A>            attribute = <FONT ID="New">new</FONT> CLRuntimeVisibleParameterAnnotationsAttribute(
<FONT ID="LN">760 </FONT><A NAME="760"></A>                    attributeNameIndex, attributeLength, (<FONT ID="Short">short</FONT>) numParameters,
<FONT ID="LN">761 </FONT><A NAME="761"></A>                    parameterAnnotations);
<FONT ID="LN">762 </FONT><A NAME="762"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">763 </FONT><A NAME="763"></A>            reportError(<FONT ID="StringLiteral">"Error reading "</FONT>
<FONT ID="LN">764 </FONT><A NAME="764"></A>                    + <FONT ID="StringLiteral">"RuntimeVisibleParameterAnnotations_attribute"</FONT>
<FONT ID="LN">765 </FONT><A NAME="765"></A>                    + <FONT ID="StringLiteral">" from file %s"</FONT>, className);
<FONT ID="LN">766 </FONT><A NAME="766"></A>        }
<FONT ID="LN">767 </FONT><A NAME="767"></A>        <FONT ID="Return">return</FONT> attribute;
<FONT ID="LN">768 </FONT><A NAME="768"></A>    }
<FONT ID="LN">769 </FONT><A NAME="769"></A>
<FONT ID="LN">770 </FONT><A NAME="770"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">771 </FONT><A NAME="771"></A>     * Read a RuntimeInvisibleParameterAnnotations attribute from the specified
<FONT ID="LN">772 </FONT><A NAME="772"></A>     * input stream, and return it.
<FONT ID="LN">773 </FONT><A NAME="773"></A>     * 
<FONT ID="LN">774 </FONT><A NAME="774"></A>     * @param in
<FONT ID="LN">775 </FONT><A NAME="775"></A>     *            input stream.
<FONT ID="LN">776 </FONT><A NAME="776"></A>     * @param attributeNameIndex
<FONT ID="LN">777 </FONT><A NAME="777"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">778 </FONT><A NAME="778"></A>     * @param attributeLength
<FONT ID="LN">779 </FONT><A NAME="779"></A>     *            length of attribute.
<FONT ID="LN">780 </FONT><A NAME="780"></A>     * @return a RuntimeInvisibleParameterAnnotations attribute.
<FONT ID="LN">781 </FONT><A NAME="781"></A>     */</FONT>
<FONT ID="LN">782 </FONT><A NAME="782"></A>
<FONT ID="LN">783 </FONT><A NAME="783"></A>    <FONT ID="Private">private</FONT> CLRuntimeInvisibleParameterAnnotationsAttribute readRuntimeInvisibleParameterAnnotationsAttribute(
<FONT ID="LN">784 </FONT><A NAME="784"></A>            CLInputStream in, <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">785 </FONT><A NAME="785"></A>        CLRuntimeInvisibleParameterAnnotationsAttribute attribute = <FONT ID="Null">null</FONT>;
<FONT ID="LN">786 </FONT><A NAME="786"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">787 </FONT><A NAME="787"></A>            <FONT ID="Int">int</FONT> numParameters = in.readUnsignedByte();
<FONT ID="LN">788 </FONT><A NAME="788"></A>            ArrayList&lt;CLParameterAnnotationInfo&gt; parameterAnnotations = <FONT ID="New">new</FONT> ArrayList&lt;CLParameterAnnotationInfo&gt;();
<FONT ID="LN">789 </FONT><A NAME="789"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> i = <FONT ID="IntegerLiteral">0</FONT>; i &lt; numParameters; i++) {
<FONT ID="LN">790 </FONT><A NAME="790"></A>                <FONT ID="Int">int</FONT> numAnnotations = in.readUnsignedShort();
<FONT ID="LN">791 </FONT><A NAME="791"></A>                ArrayList&lt;CLAnnotation&gt; annotations = <FONT ID="New">new</FONT> ArrayList&lt;CLAnnotation&gt;();
<FONT ID="LN">792 </FONT><A NAME="792"></A>                <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> j = <FONT ID="IntegerLiteral">0</FONT>; j &lt; numAnnotations; j++) {
<FONT ID="LN">793 </FONT><A NAME="793"></A>                    CLAnnotation annotation = readAnnotation(in);
<FONT ID="LN">794 </FONT><A NAME="794"></A>                    annotations.add(annotation);
<FONT ID="LN">795 </FONT><A NAME="795"></A>                }
<FONT ID="LN">796 </FONT><A NAME="796"></A>                parameterAnnotations.add(<FONT ID="New">new</FONT> CLParameterAnnotationInfo(
<FONT ID="LN">797 </FONT><A NAME="797"></A>                        numAnnotations, annotations));
<FONT ID="LN">798 </FONT><A NAME="798"></A>            }
<FONT ID="LN">799 </FONT><A NAME="799"></A>            attribute = <FONT ID="New">new</FONT> CLRuntimeInvisibleParameterAnnotationsAttribute(
<FONT ID="LN">800 </FONT><A NAME="800"></A>                    attributeNameIndex, attributeLength, (<FONT ID="Short">short</FONT>) numParameters,
<FONT ID="LN">801 </FONT><A NAME="801"></A>                    parameterAnnotations);
<FONT ID="LN">802 </FONT><A NAME="802"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">803 </FONT><A NAME="803"></A>            reportError(<FONT ID="StringLiteral">"Error reading "</FONT>
<FONT ID="LN">804 </FONT><A NAME="804"></A>                    + <FONT ID="StringLiteral">"RuntimeInvisibleParameterAnnotations_attribute"</FONT>
<FONT ID="LN">805 </FONT><A NAME="805"></A>                    + <FONT ID="StringLiteral">" from file %s"</FONT>, className);
<FONT ID="LN">806 </FONT><A NAME="806"></A>        }
<FONT ID="LN">807 </FONT><A NAME="807"></A>        <FONT ID="Return">return</FONT> attribute;
<FONT ID="LN">808 </FONT><A NAME="808"></A>    }
<FONT ID="LN">809 </FONT><A NAME="809"></A>
<FONT ID="LN">810 </FONT><A NAME="810"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">811 </FONT><A NAME="811"></A>     * Read a AnnotationDefault attribute from t he specified input stream, and
<FONT ID="LN">812 </FONT><A NAME="812"></A>     * return it.
<FONT ID="LN">813 </FONT><A NAME="813"></A>     * 
<FONT ID="LN">814 </FONT><A NAME="814"></A>     * @param in
<FONT ID="LN">815 </FONT><A NAME="815"></A>     *            input stream.
<FONT ID="LN">816 </FONT><A NAME="816"></A>     * @param attributeNameIndex
<FONT ID="LN">817 </FONT><A NAME="817"></A>     *            constant pool index of the attribute name.
<FONT ID="LN">818 </FONT><A NAME="818"></A>     * @param attributeLength
<FONT ID="LN">819 </FONT><A NAME="819"></A>     *            length of attribute.
<FONT ID="LN">820 </FONT><A NAME="820"></A>     * @return a AnnotationDefault attribute.
<FONT ID="LN">821 </FONT><A NAME="821"></A>     */</FONT>
<FONT ID="LN">822 </FONT><A NAME="822"></A>
<FONT ID="LN">823 </FONT><A NAME="823"></A>    <FONT ID="Private">private</FONT> CLAnnotationDefaultAttribute readAnnotationDefaultAttribute(
<FONT ID="LN">824 </FONT><A NAME="824"></A>            CLInputStream in, <FONT ID="Int">int</FONT> attributeNameIndex, <FONT ID="Long">long</FONT> attributeLength) {
<FONT ID="LN">825 </FONT><A NAME="825"></A>        <FONT ID="Return">return</FONT> <FONT ID="New">new</FONT> CLAnnotationDefaultAttribute(attributeNameIndex,
<FONT ID="LN">826 </FONT><A NAME="826"></A>                attributeLength, readElementValue(in));
<FONT ID="LN">827 </FONT><A NAME="827"></A>    }
<FONT ID="LN">828 </FONT><A NAME="828"></A>
<FONT ID="LN">829 </FONT><A NAME="829"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">830 </FONT><A NAME="830"></A>     * Read an ElementValue from the specified input stream, and return it.
<FONT ID="LN">831 </FONT><A NAME="831"></A>     * 
<FONT ID="LN">832 </FONT><A NAME="832"></A>     * @param in
<FONT ID="LN">833 </FONT><A NAME="833"></A>     *            input stream.
<FONT ID="LN">834 </FONT><A NAME="834"></A>     * @return an ElemenvValue.
<FONT ID="LN">835 </FONT><A NAME="835"></A>     */</FONT>
<FONT ID="LN">836 </FONT><A NAME="836"></A>
<FONT ID="LN">837 </FONT><A NAME="837"></A>    <FONT ID="Private">private</FONT> CLElementValue readElementValue(CLInputStream in) {
<FONT ID="LN">838 </FONT><A NAME="838"></A>        CLElementValue elementValue = <FONT ID="Null">null</FONT>;
<FONT ID="LN">839 </FONT><A NAME="839"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">840 </FONT><A NAME="840"></A>            <FONT ID="Int">int</FONT> tag = in.readUnsignedByte();
<FONT ID="LN">841 </FONT><A NAME="841"></A>            <FONT ID="Switch">switch</FONT> (tag) {
<FONT ID="LN">842 </FONT><A NAME="842"></A>            <FONT ID="Case">case</FONT> ELT_B:
<FONT ID="LN">843 </FONT><A NAME="843"></A>            <FONT ID="Case">case</FONT> ELT_C:
<FONT ID="LN">844 </FONT><A NAME="844"></A>            <FONT ID="Case">case</FONT> ELT_D:
<FONT ID="LN">845 </FONT><A NAME="845"></A>            <FONT ID="Case">case</FONT> ELT_F:
<FONT ID="LN">846 </FONT><A NAME="846"></A>            <FONT ID="Case">case</FONT> ELT_I:
<FONT ID="LN">847 </FONT><A NAME="847"></A>            <FONT ID="Case">case</FONT> ELT_J:
<FONT ID="LN">848 </FONT><A NAME="848"></A>            <FONT ID="Case">case</FONT> ELT_S:
<FONT ID="LN">849 </FONT><A NAME="849"></A>            <FONT ID="Case">case</FONT> ELT_Z:
<FONT ID="LN">850 </FONT><A NAME="850"></A>            <FONT ID="Case">case</FONT> ELT_s:
<FONT ID="LN">851 </FONT><A NAME="851"></A>                elementValue = <FONT ID="New">new</FONT> CLElementValue((<FONT ID="Short">short</FONT>) tag, in
<FONT ID="LN">852 </FONT><A NAME="852"></A>                        .readUnsignedShort());
<FONT ID="LN">853 </FONT><A NAME="853"></A>                <FONT ID="Break">break</FONT>;
<FONT ID="LN">854 </FONT><A NAME="854"></A>            <FONT ID="Case">case</FONT> ELT_e:
<FONT ID="LN">855 </FONT><A NAME="855"></A>                elementValue = <FONT ID="New">new</FONT> CLElementValue(in.readUnsignedShort(), in
<FONT ID="LN">856 </FONT><A NAME="856"></A>                        .readUnsignedShort());
<FONT ID="LN">857 </FONT><A NAME="857"></A>                <FONT ID="Break">break</FONT>;
<FONT ID="LN">858 </FONT><A NAME="858"></A>            <FONT ID="Case">case</FONT> ELT_c:
<FONT ID="LN">859 </FONT><A NAME="859"></A>                elementValue = <FONT ID="New">new</FONT> CLElementValue(in.readUnsignedShort());
<FONT ID="LN">860 </FONT><A NAME="860"></A>                <FONT ID="Break">break</FONT>;
<FONT ID="LN">861 </FONT><A NAME="861"></A>            <FONT ID="Case">case</FONT> ELT_ANNOTATION:
<FONT ID="LN">862 </FONT><A NAME="862"></A>                elementValue = <FONT ID="New">new</FONT> CLElementValue(readAnnotation(in));
<FONT ID="LN">863 </FONT><A NAME="863"></A>                <FONT ID="Break">break</FONT>;
<FONT ID="LN">864 </FONT><A NAME="864"></A>            <FONT ID="Case">case</FONT> ELT_ARRAY:
<FONT ID="LN">865 </FONT><A NAME="865"></A>                <FONT ID="Int">int</FONT> numValues = in.readUnsignedShort();
<FONT ID="LN">866 </FONT><A NAME="866"></A>                ArrayList&lt;CLElementValue&gt; values = <FONT ID="New">new</FONT> ArrayList&lt;CLElementValue&gt;();
<FONT ID="LN">867 </FONT><A NAME="867"></A>                <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> i = <FONT ID="IntegerLiteral">0</FONT>; i &lt; numValues; i++) {
<FONT ID="LN">868 </FONT><A NAME="868"></A>                    values.add(readElementValue(in));
<FONT ID="LN">869 </FONT><A NAME="869"></A>                }
<FONT ID="LN">870 </FONT><A NAME="870"></A>                elementValue = <FONT ID="New">new</FONT> CLElementValue(numValues, values);
<FONT ID="LN">871 </FONT><A NAME="871"></A>            }
<FONT ID="LN">872 </FONT><A NAME="872"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">873 </FONT><A NAME="873"></A>            reportError(<FONT ID="StringLiteral">"Error reading AnnotationDefault_attribute "</FONT>
<FONT ID="LN">874 </FONT><A NAME="874"></A>                    + <FONT ID="StringLiteral">"from file %s"</FONT>, className);
<FONT ID="LN">875 </FONT><A NAME="875"></A>        }
<FONT ID="LN">876 </FONT><A NAME="876"></A>        <FONT ID="Return">return</FONT> elementValue;
<FONT ID="LN">877 </FONT><A NAME="877"></A>    }
<FONT ID="LN">878 </FONT><A NAME="878"></A>
<FONT ID="LN">879 </FONT><A NAME="879"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">880 </FONT><A NAME="880"></A>     * Read an Annotation from the specified input stream, and return it.
<FONT ID="LN">881 </FONT><A NAME="881"></A>     * 
<FONT ID="LN">882 </FONT><A NAME="882"></A>     * @param in
<FONT ID="LN">883 </FONT><A NAME="883"></A>     *            input stream.
<FONT ID="LN">884 </FONT><A NAME="884"></A>     * @return an Annotation.
<FONT ID="LN">885 </FONT><A NAME="885"></A>     */</FONT>
<FONT ID="LN">886 </FONT><A NAME="886"></A>
<FONT ID="LN">887 </FONT><A NAME="887"></A>    <FONT ID="Private">private</FONT> CLAnnotation readAnnotation(CLInputStream in) {
<FONT ID="LN">888 </FONT><A NAME="888"></A>        CLAnnotation annotation = <FONT ID="Null">null</FONT>;
<FONT ID="LN">889 </FONT><A NAME="889"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">890 </FONT><A NAME="890"></A>            <FONT ID="Int">int</FONT> typeIndex = in.readUnsignedShort();
<FONT ID="LN">891 </FONT><A NAME="891"></A>            <FONT ID="Int">int</FONT> numElementValuePairs = in.readUnsignedShort();
<FONT ID="LN">892 </FONT><A NAME="892"></A>            ArrayList&lt;CLElementValuePair&gt; elementValuePairs = <FONT ID="New">new</FONT> ArrayList&lt;CLElementValuePair&gt;();
<FONT ID="LN">893 </FONT><A NAME="893"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> i = <FONT ID="IntegerLiteral">0</FONT>; i &lt; numElementValuePairs; i++) {
<FONT ID="LN">894 </FONT><A NAME="894"></A>                <FONT ID="Int">int</FONT> elementNameIndex = in.readUnsignedShort();
<FONT ID="LN">895 </FONT><A NAME="895"></A>                CLElementValue value = readElementValue(in);
<FONT ID="LN">896 </FONT><A NAME="896"></A>                elementValuePairs.add(<FONT ID="New">new</FONT> CLElementValuePair(elementNameIndex,
<FONT ID="LN">897 </FONT><A NAME="897"></A>                        value));
<FONT ID="LN">898 </FONT><A NAME="898"></A>            }
<FONT ID="LN">899 </FONT><A NAME="899"></A>            annotation = <FONT ID="New">new</FONT> CLAnnotation(typeIndex, numElementValuePairs,
<FONT ID="LN">900 </FONT><A NAME="900"></A>                    elementValuePairs);
<FONT ID="LN">901 </FONT><A NAME="901"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">902 </FONT><A NAME="902"></A>            reportError(<FONT ID="StringLiteral">"Error reading Annotation from file %s"</FONT>, className);
<FONT ID="LN">903 </FONT><A NAME="903"></A>        }
<FONT ID="LN">904 </FONT><A NAME="904"></A>        <FONT ID="Return">return</FONT> annotation;
<FONT ID="LN">905 </FONT><A NAME="905"></A>    }
<FONT ID="LN">906 </FONT><A NAME="906"></A>
<FONT ID="LN">907 </FONT><A NAME="907"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">908 </FONT><A NAME="908"></A>     * Construct a CLAbsorber object given the (fully-qualified) name of the
<FONT ID="LN">909 </FONT><A NAME="909"></A>     * class file to read.
<FONT ID="LN">910 </FONT><A NAME="910"></A>     * 
<FONT ID="LN">911 </FONT><A NAME="911"></A>     * @param className
<FONT ID="LN">912 </FONT><A NAME="912"></A>     *            fully qualified name of the input class file.
<FONT ID="LN">913 </FONT><A NAME="913"></A>     */</FONT>
<FONT ID="LN">914 </FONT><A NAME="914"></A>
<FONT ID="LN">915 </FONT><A NAME="915"></A>    <FONT ID="Public">public</FONT> CLAbsorber(String className) {
<FONT ID="LN">916 </FONT><A NAME="916"></A>        <FONT ID="Try">try</FONT> {
<FONT ID="LN">917 </FONT><A NAME="917"></A>            <FONT ID="This">this</FONT>.className = className;
<FONT ID="LN">918 </FONT><A NAME="918"></A>            <A HREF="../jminusminus/CLPath.java.html">CLPath</A> classPath = <FONT ID="New">new</FONT> <A HREF="../jminusminus/CLPath.java.html">CLPath</A>();
<FONT ID="LN">919 </FONT><A NAME="919"></A>            CLInputStream in = classPath.loadClass(className);
<FONT ID="LN">920 </FONT><A NAME="920"></A>            errorHasOccurred = <FONT ID="False">false</FONT>;
<FONT ID="LN">921 </FONT><A NAME="921"></A>            <FONT ID="If">if</FONT> (in == <FONT ID="Null">null</FONT>) {
<FONT ID="LN">922 </FONT><A NAME="922"></A>                reportError(<FONT ID="StringLiteral">"Error loading %s"</FONT>, className);
<FONT ID="LN">923 </FONT><A NAME="923"></A>                <FONT ID="Return">return</FONT>;
<FONT ID="LN">924 </FONT><A NAME="924"></A>            }
<FONT ID="LN">925 </FONT><A NAME="925"></A>            classFile = <FONT ID="New">new</FONT> <A HREF="../jminusminus/CLFile.java.html">CLFile</A>();
<FONT ID="LN">926 </FONT><A NAME="926"></A>
<FONT ID="LN">927 </FONT><A NAME="927"></A>            <FONT ID="SingleLineComment">// Read magic number (0xCAFEBABE)
<FONT ID="LN">928 </FONT><A NAME="928"></A></FONT>            <FONT ID="Long">long</FONT> magic = in.readUnsignedInt();
<FONT ID="LN">929 </FONT><A NAME="929"></A>            <FONT ID="If">if</FONT> (magic != MAGIC) {
<FONT ID="LN">930 </FONT><A NAME="930"></A>                reportWarning(<FONT ID="StringLiteral">"%s has an invalid magic number"</FONT>, className);
<FONT ID="LN">931 </FONT><A NAME="931"></A>                <FONT ID="Return">return</FONT>;
<FONT ID="LN">932 </FONT><A NAME="932"></A>            }
<FONT ID="LN">933 </FONT><A NAME="933"></A>            classFile.magic = magic;
<FONT ID="LN">934 </FONT><A NAME="934"></A>
<FONT ID="LN">935 </FONT><A NAME="935"></A>            <FONT ID="SingleLineComment">// Read minor version, major version
<FONT ID="LN">936 </FONT><A NAME="936"></A></FONT>            classFile.minorVersion = in.readUnsignedShort();
<FONT ID="LN">937 </FONT><A NAME="937"></A>            classFile.majorVersion = in.readUnsignedShort();
<FONT ID="LN">938 </FONT><A NAME="938"></A>
<FONT ID="LN">939 </FONT><A NAME="939"></A>            <FONT ID="SingleLineComment">// Read constant pool count, constant pool
<FONT ID="LN">940 </FONT><A NAME="940"></A></FONT>            classFile.constantPoolCount = in.readUnsignedShort();
<FONT ID="LN">941 </FONT><A NAME="941"></A>            classFile.constantPool = readConstantPool(in);
<FONT ID="LN">942 </FONT><A NAME="942"></A>            <FONT ID="If">if</FONT> (errorHasOccurred()) {
<FONT ID="LN">943 </FONT><A NAME="943"></A>                <FONT ID="Return">return</FONT>;
<FONT ID="LN">944 </FONT><A NAME="944"></A>            }
<FONT ID="LN">945 </FONT><A NAME="945"></A>
<FONT ID="LN">946 </FONT><A NAME="946"></A>            <FONT ID="SingleLineComment">// Read access flags for the class
<FONT ID="LN">947 </FONT><A NAME="947"></A></FONT>            classFile.accessFlags = in.readUnsignedShort();
<FONT ID="LN">948 </FONT><A NAME="948"></A>
<FONT ID="LN">949 </FONT><A NAME="949"></A>            <FONT ID="SingleLineComment">// Read this class' constant pool index
<FONT ID="LN">950 </FONT><A NAME="950"></A></FONT>            classFile.thisClass = in.readUnsignedShort();
<FONT ID="LN">951 </FONT><A NAME="951"></A>
<FONT ID="LN">952 </FONT><A NAME="952"></A>            <FONT ID="SingleLineComment">// Read super class' constant pool index
<FONT ID="LN">953 </FONT><A NAME="953"></A></FONT>            classFile.superClass = in.readUnsignedShort();
<FONT ID="LN">954 </FONT><A NAME="954"></A>
<FONT ID="LN">955 </FONT><A NAME="955"></A>            <FONT ID="SingleLineComment">// Read interfaces (implemented by the class being
<FONT ID="LN">956 </FONT><A NAME="956"></A></FONT>            <FONT ID="SingleLineComment">// read) count and interfaces (constant pool
<FONT ID="LN">957 </FONT><A NAME="957"></A></FONT>            <FONT ID="SingleLineComment">// indices)
<FONT ID="LN">958 </FONT><A NAME="958"></A></FONT>            <FONT ID="Int">int</FONT> interfacesCount = in.readUnsignedShort();
<FONT ID="LN">959 </FONT><A NAME="959"></A>            ArrayList&lt;Integer&gt; interfaces = <FONT ID="New">new</FONT> ArrayList&lt;Integer&gt;();
<FONT ID="LN">960 </FONT><A NAME="960"></A>            classFile.interfacesCount = interfacesCount;
<FONT ID="LN">961 </FONT><A NAME="961"></A>            <FONT ID="For">for</FONT> (<FONT ID="Int">int</FONT> i = <FONT ID="IntegerLiteral">0</FONT>; i &lt; interfacesCount; i++) {
<FONT ID="LN">962 </FONT><A NAME="962"></A>                interfaces.add(in.readUnsignedShort());
<FONT ID="LN">963 </FONT><A NAME="963"></A>            }
<FONT ID="LN">964 </FONT><A NAME="964"></A>            classFile.interfaces = interfaces;
<FONT ID="LN">965 </FONT><A NAME="965"></A>
<FONT ID="LN">966 </FONT><A NAME="966"></A>            <FONT ID="SingleLineComment">// Read fields count and fields
<FONT ID="LN">967 </FONT><A NAME="967"></A></FONT>            classFile.fieldsCount = in.readUnsignedShort();
<FONT ID="LN">968 </FONT><A NAME="968"></A>            classFile.fields = readFields(in, classFile.fieldsCount);
<FONT ID="LN">969 </FONT><A NAME="969"></A>            <FONT ID="If">if</FONT> (errorHasOccurred()) {
<FONT ID="LN">970 </FONT><A NAME="970"></A>                <FONT ID="Return">return</FONT>;
<FONT ID="LN">971 </FONT><A NAME="971"></A>            }
<FONT ID="LN">972 </FONT><A NAME="972"></A>
<FONT ID="LN">973 </FONT><A NAME="973"></A>            <FONT ID="SingleLineComment">// Read methods count and methods
<FONT ID="LN">974 </FONT><A NAME="974"></A></FONT>            classFile.methodsCount = in.readUnsignedShort();
<FONT ID="LN">975 </FONT><A NAME="975"></A>            classFile.methods = readMethods(in, classFile.methodsCount);
<FONT ID="LN">976 </FONT><A NAME="976"></A>            <FONT ID="If">if</FONT> (errorHasOccurred()) {
<FONT ID="LN">977 </FONT><A NAME="977"></A>                <FONT ID="Return">return</FONT>;
<FONT ID="LN">978 </FONT><A NAME="978"></A>            }
<FONT ID="LN">979 </FONT><A NAME="979"></A>
<FONT ID="LN">980 </FONT><A NAME="980"></A>            <FONT ID="SingleLineComment">// Read class attributes
<FONT ID="LN">981 </FONT><A NAME="981"></A></FONT>            classFile.attributesCount = in.readUnsignedShort();
<FONT ID="LN">982 </FONT><A NAME="982"></A>            classFile.attributes = readAttributes(in, classFile.attributesCount);
<FONT ID="LN">983 </FONT><A NAME="983"></A>        } <FONT ID="Catch">catch</FONT> (EOFException e) {
<FONT ID="LN">984 </FONT><A NAME="984"></A>            reportError(<FONT ID="StringLiteral">"Unexpected end of file %s"</FONT>, className);
<FONT ID="LN">985 </FONT><A NAME="985"></A>        } <FONT ID="Catch">catch</FONT> (IOException e) {
<FONT ID="LN">986 </FONT><A NAME="986"></A>            reportError(<FONT ID="StringLiteral">"Error reading file %s"</FONT>, className);
<FONT ID="LN">987 </FONT><A NAME="987"></A>        }
<FONT ID="LN">988 </FONT><A NAME="988"></A>    }
<FONT ID="LN">989 </FONT><A NAME="989"></A>
<FONT ID="LN">990 </FONT><A NAME="990"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">991 </FONT><A NAME="991"></A>     * Return the CLFile representation of the class that was read.
<FONT ID="LN">992 </FONT><A NAME="992"></A>     * 
<FONT ID="LN">993 </FONT><A NAME="993"></A>     * @return the CLFile representation of the class.
<FONT ID="LN">994 </FONT><A NAME="994"></A>     */</FONT>
<FONT ID="LN">995 </FONT><A NAME="995"></A>
<FONT ID="LN">996 </FONT><A NAME="996"></A>    <FONT ID="Public">public</FONT> <A HREF="../jminusminus/CLFile.java.html">CLFile</A> classFile() {
<FONT ID="LN">997 </FONT><A NAME="997"></A>        <FONT ID="Return">return</FONT> classFile;
<FONT ID="LN">998 </FONT><A NAME="998"></A>    }
<FONT ID="LN">999 </FONT><A NAME="999"></A>
<FONT ID="LN">1000</FONT><A NAME="1000"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">1001</FONT><A NAME="1001"></A>     * Return true if an error had occurred while reading the class; false
<FONT ID="LN">1002</FONT><A NAME="1002"></A>     * otherwise.
<FONT ID="LN">1003</FONT><A NAME="1003"></A>     * 
<FONT ID="LN">1004</FONT><A NAME="1004"></A>     * @return true or false.
<FONT ID="LN">1005</FONT><A NAME="1005"></A>     */</FONT>
<FONT ID="LN">1006</FONT><A NAME="1006"></A>
<FONT ID="LN">1007</FONT><A NAME="1007"></A>    <FONT ID="Public">public</FONT> <FONT ID="Boolean">boolean</FONT> errorHasOccurred() {
<FONT ID="LN">1008</FONT><A NAME="1008"></A>        <FONT ID="Return">return</FONT> errorHasOccurred;
<FONT ID="LN">1009</FONT><A NAME="1009"></A>    }
<FONT ID="LN">1010</FONT><A NAME="1010"></A>
<FONT ID="LN">1011</FONT><A NAME="1011"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">1012</FONT><A NAME="1012"></A>     * Driver for CLAbsorber. It accepts the (fully-qualified) name of a class
<FONT ID="LN">1013</FONT><A NAME="1013"></A>     * file as command-line argument and dumps its (ClassFile) structure --
<FONT ID="LN">1014</FONT><A NAME="1014"></A>     * CLFile in our representation -- to STDOUT in a format similar to that of
<FONT ID="LN">1015</FONT><A NAME="1015"></A>     * javap.
<FONT ID="LN">1016</FONT><A NAME="1016"></A>     */</FONT>
<FONT ID="LN">1017</FONT><A NAME="1017"></A>
<FONT ID="LN">1018</FONT><A NAME="1018"></A>    <FONT ID="Public">public</FONT> <FONT ID="Static">static</FONT> <FONT ID="Void">void</FONT> main(String[] args) {
<FONT ID="LN">1019</FONT><A NAME="1019"></A>        String classFile = <FONT ID="StringLiteral">""</FONT>;
<FONT ID="LN">1020</FONT><A NAME="1020"></A>        <FONT ID="If">if</FONT> (args.length == <FONT ID="IntegerLiteral">1</FONT>) {
<FONT ID="LN">1021</FONT><A NAME="1021"></A>            classFile = args[<FONT ID="IntegerLiteral">0</FONT>];
<FONT ID="LN">1022</FONT><A NAME="1022"></A>        } <FONT ID="Else">else</FONT> {
<FONT ID="LN">1023</FONT><A NAME="1023"></A>            String usage = <FONT ID="StringLiteral">"Usage: java jminusminus.CLAbsorber &lt;class name&gt;\n"</FONT>
<FONT ID="LN">1024</FONT><A NAME="1024"></A>                    + <FONT ID="StringLiteral">"Where the class name must be fully qualified; "</FONT>
<FONT ID="LN">1025</FONT><A NAME="1025"></A>                    + <FONT ID="StringLiteral">"eg, java/util/ArrayList"</FONT>;
<FONT ID="LN">1026</FONT><A NAME="1026"></A>            System.out.println(usage);
<FONT ID="LN">1027</FONT><A NAME="1027"></A>            System.exit(<FONT ID="IntegerLiteral">0</FONT>);
<FONT ID="LN">1028</FONT><A NAME="1028"></A>        }
<FONT ID="LN">1029</FONT><A NAME="1029"></A>        <A HREF="../jminusminus/CLAbsorber.java.html">CLAbsorber</A> r = <FONT ID="New">new</FONT> <A HREF="../jminusminus/CLAbsorber.java.html">CLAbsorber</A>(classFile);
<FONT ID="LN">1030</FONT><A NAME="1030"></A>        <FONT ID="If">if</FONT> (!r.errorHasOccurred()) {
<FONT ID="LN">1031</FONT><A NAME="1031"></A>            <A HREF="../jminusminus/CLFile.java.html">CLFile</A> c = r.classFile();
<FONT ID="LN">1032</FONT><A NAME="1032"></A>            c.writeToStdOut();
<FONT ID="LN">1033</FONT><A NAME="1033"></A>        }
<FONT ID="LN">1034</FONT><A NAME="1034"></A>    }
<FONT ID="LN">1035</FONT><A NAME="1035"></A>
<FONT ID="LN">1036</FONT><A NAME="1036"></A>}
<FONT ID="LN">1037</FONT><A NAME="1037"></A>
<FONT ID="LN">1038</FONT><A NAME="1038"></A><FONT ID="FormalComment">/**
<FONT ID="LN">1039</FONT><A NAME="1039"></A> * Inherits from java.io.DataInputStream and provides an extra function for
<FONT ID="LN">1040</FONT><A NAME="1040"></A> * reading unsigned int from the input stream, which is required for reading
<FONT ID="LN">1041</FONT><A NAME="1041"></A> * Java class files.
<FONT ID="LN">1042</FONT><A NAME="1042"></A> */</FONT>
<FONT ID="LN">1043</FONT><A NAME="1043"></A>
<FONT ID="LN">1044</FONT><A NAME="1044"></A><FONT ID="Class">class</FONT> CLInputStream <FONT ID="Extends">extends</FONT> DataInputStream {
<FONT ID="LN">1045</FONT><A NAME="1045"></A>
<FONT ID="LN">1046</FONT><A NAME="1046"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">1047</FONT><A NAME="1047"></A>     * Construct a CLInputStream object from the specified input stream.
<FONT ID="LN">1048</FONT><A NAME="1048"></A>     * 
<FONT ID="LN">1049</FONT><A NAME="1049"></A>     * @param in
<FONT ID="LN">1050</FONT><A NAME="1050"></A>     *            input stream.
<FONT ID="LN">1051</FONT><A NAME="1051"></A>     */</FONT>
<FONT ID="LN">1052</FONT><A NAME="1052"></A>
<FONT ID="LN">1053</FONT><A NAME="1053"></A>    <FONT ID="Public">public</FONT> CLInputStream(InputStream in) {
<FONT ID="LN">1054</FONT><A NAME="1054"></A>        <FONT ID="Super">super</FONT>(in);
<FONT ID="LN">1055</FONT><A NAME="1055"></A>    }
<FONT ID="LN">1056</FONT><A NAME="1056"></A>
<FONT ID="LN">1057</FONT><A NAME="1057"></A>    <FONT ID="FormalComment">/**
<FONT ID="LN">1058</FONT><A NAME="1058"></A>     * Read four input bytes and return a long value in the range 0 through
<FONT ID="LN">1059</FONT><A NAME="1059"></A>     * 4294967295. Let a, b, c, d be the four bytes. The value returned is:
<FONT ID="LN">1060</FONT><A NAME="1060"></A>     * 
<FONT ID="LN">1061</FONT><A NAME="1061"></A>     * &lt;pre&gt;
<FONT ID="LN">1062</FONT><A NAME="1062"></A>     *   ( b[ 0 ] &amp;amp; 0xFF ) &amp;lt;&amp;lt; 24 ) | 
<FONT ID="LN">1063</FONT><A NAME="1063"></A>     *   ( ( b[ 1 ] &amp;amp; 0xFF ) &amp;lt;&amp;lt; 16 ) | 
<FONT ID="LN">1064</FONT><A NAME="1064"></A>     *   ( ( b[ 2 ] &amp;amp; 0xFF ) &amp;lt;&amp;lt; 8 ) | 
<FONT ID="LN">1065</FONT><A NAME="1065"></A>     *   ( b[ 3 ] &amp;amp; 0xFF )
<FONT ID="LN">1066</FONT><A NAME="1066"></A>     * &lt;/pre&gt;
<FONT ID="LN">1067</FONT><A NAME="1067"></A>     * 
<FONT ID="LN">1068</FONT><A NAME="1068"></A>     * @return the unsigned 32-bit value.
<FONT ID="LN">1069</FONT><A NAME="1069"></A>     * @exception EOFException
<FONT ID="LN">1070</FONT><A NAME="1070"></A>     *                if this stream reaches the end before reading all the
<FONT ID="LN">1071</FONT><A NAME="1071"></A>     *                bytes.
<FONT ID="LN">1072</FONT><A NAME="1072"></A>     * @exception IOException
<FONT ID="LN">1073</FONT><A NAME="1073"></A>     *                if an I/O error occurs.
<FONT ID="LN">1074</FONT><A NAME="1074"></A>     */</FONT>
<FONT ID="LN">1075</FONT><A NAME="1075"></A>
<FONT ID="LN">1076</FONT><A NAME="1076"></A>    <FONT ID="Public">public</FONT> <FONT ID="Final">final</FONT> <FONT ID="Long">long</FONT> readUnsignedInt() <FONT ID="Throws">throws</FONT> IOException {
<FONT ID="LN">1077</FONT><A NAME="1077"></A>        <FONT ID="Byte">byte</FONT>[] b = <FONT ID="New">new</FONT> <FONT ID="Byte">byte</FONT>[<FONT ID="IntegerLiteral">4</FONT>];
<FONT ID="LN">1078</FONT><A NAME="1078"></A>        <FONT ID="Long">long</FONT> mask = <FONT ID="IntegerLiteral">0xFF</FONT>, l;
<FONT ID="LN">1079</FONT><A NAME="1079"></A>        in.read(b);
<FONT ID="LN">1080</FONT><A NAME="1080"></A>        l = ((b[<FONT ID="IntegerLiteral">0</FONT>] &amp; mask) &lt;&lt; <FONT ID="IntegerLiteral">24</FONT>) | ((b[<FONT ID="IntegerLiteral">1</FONT>] &amp; mask) &lt;&lt; <FONT ID="IntegerLiteral">16</FONT>)
<FONT ID="LN">1081</FONT><A NAME="1081"></A>                | ((b[<FONT ID="IntegerLiteral">2</FONT>] &amp; mask) &lt;&lt; <FONT ID="IntegerLiteral">8</FONT>) | (b[<FONT ID="IntegerLiteral">3</FONT>] &amp; mask);
<FONT ID="LN">1082</FONT><A NAME="1082"></A>        <FONT ID="Return">return</FONT> l;
<FONT ID="LN">1083</FONT><A NAME="1083"></A>    }
<FONT ID="LN">1084</FONT><A NAME="1084"></A>
<FONT ID="LN">1085</FONT><A NAME="1085"></A>}
<FONT ID="LN">1086</FONT><A NAME="1086"></A></pre>
</BODY>
</HTML>